Überprüfen Sie, ob div kollpased JqerUy ist

if ($("#div").hasClass('collapsed')) {
    alert("collapsed");
}
Fantastic Flatworm