jQuery - slideToggle, testing if up or down
Hi all
I have a simple slideToggle that slides a sub menu up and down
I also have a .scroll function when the window is scrolled.Code:$('a#btn-portfolio').click(function(){ $('#sub_menu').slideToggle('slow'); });
If the window is scrolled and the #sub_menu is closed I would like #sub_menu to slide down.
Is there a way of testing if the #sub_menu is open or closed when using slideToggle.
Something like:
Code:if(!#sub_menu.open){ #sub_menu.slideDown(); }



Reply With Quote


Bookmarks