Jakub Jakub - 1 year ago 73
Javascript Question

Make jquery menu tabs closed by default on load

like in the title, I need to have menu tabs closed by default on load.
The code is:

$('#cssmenu li.active').addClass('open').children('ul').show();


When you change "show" to "hide", it works, but only after the second click...
Any ideas?

Answer Source

Like so:

$('#cssmenu li.active').removeClass('open').children('ul').hide();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download