jquery - removeClass or toggleClass with transitions? -


i have nice little jquery script expand button, , pushing down content below when opens (just doing addclass()). works fine. when close button, wanted removeclass() (to move content up), that's not working, class, 'open' stays on element-- have seen lot of stuff out there saying removeclass has caused issues people.

toggleclass got me little closer want be, transition abrupt. there way add css transition when using toggleclass???

here's code add/removeclass option...i using jquery 1.11.3

    <script>             $('#burger').click(function() {                   $(this).toggleclass('expanded').siblings('div').slidetoggle();                 $('#logo').addclass('open').slidetoggle;               });        $('#burger.expanded').click(function(){       $('#logo').removeclass('open');        }); 

may problem have ...s('open').slidetoggle;, not calling function? should have slidetoggle(), not slidetoggle.


Comments