I am making a website in Jquery and HTMl and i have a side Navigation Menus.
But By default i am getting the menu open i want that menu to get open when i click on that.
$("div#mws-navigation ul li a, div#mws-navigation ul li span")
.bind('click', function (event) {
if ($(this).next('ul').size() !== 0) {
$(this).next('ul').slideToggle('fast', function () {
$(this).toggleClass('closed');
});
event.preventDefault();
}
});
This is the code. when i click on menu I get the menu open and closed. But by default i want that menu Open.
I think you could do the following: