Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Mobile Navigation Dropdown Re: Mobile Navigation Dropdown

#114588
Senff
Participant

When I look at the end of your jQuery library, I see this line:

jQuery.noConflict();

That means you should change $ to jQuery everywhere in your code, but you’ve replaced it with $j — so that’s why it won’t work.

Try this code on your site:

jQuery(‘ul.menu > li > a’).click(function(e) {

jQuery(‘ul.sub-menu’).slideUp(‘normal’);

if(jQuery(this).next(‘ul.sub-menu’).is(‘:hidden’) == true) {
jQuery(this).next(‘ul.sub-menu’).slideDown(‘normal’);
}

e.preventDefault();