Home › Forums › CSS › [Solved] jQuery: Menus appear/disappear on click › Re: [Solved] jQuery: Menus appear/disappear on click
November 22, 2010 at 3:46 pm
#72680
Member
rzea,
You could use this for SEO fix.
- Products & Services (1)
- Support & Training (2)
- Communities (3)
- Store (4)
1111
2222
3333
4444
And use the following jQuery / Javascript
$(document).ready(function(){
$('.megamenu').css('display','none');
$('ul li span').click(function(){
if($(this).attr('class') != 'displayed'){
$('.megamenu').hide();
$('ul li span').removeClass('displayed');
linkUrl = $(this).attr('rel');
$('#' + linkUrl).css('display','block').animate({opacity:1});
$(this).addClass('displayed');
return false;
}
if($(this).attr('class') == 'displayed'){
linkUrl = $(this).attr('rel');
linkUrl = linkUrl.replace('#','');
$('#' + linkUrl).css('display','none').animate({opacity:1});
$(this).removeClass('displayed');
return false;
}
return false;
});
});
You can make the HTML sementically correct and SEO friendly.
Does this help you?
*corrected for SEO (read your response wrong).