PDA

View Full Version : Hover state of jQuery Multi Level CSS Menu #1



Paramasivan
09-19-2011, 01:57 PM
1) Script Title: jQuery Multi Level CSS Menu #1

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_horizontal_blue/

3) There is hover state for the main menus and the sub-menus. When the cursor is in its sub-menu, the hover state of the corresponding main menu disappears. I want to retain the hover state of the main menu when the cursor is in its sub-menus.

Any help?

Paramasivan
09-22-2011, 06:43 PM
Is it possible with Javascipt or jQuery statements?

Paramasivan
09-24-2011, 04:31 PM
Will the script such as the below will fix this problem?

// dropdown navigation
$(".navcontent ul:first li:has(ul)").each(function(){ $(this).find('a:first').addClass('dropdownlink'); }); // add class to dropdown link
$(".navcontent ul:first li:has(ul)").each(function(){ $(this).find('li:last').addClass('lastlink'); }); // add class to last dropdown list
/*$(".navcontent ul:first li:has(ul)").hover(function(){
$(this).find('ul:first').css({visibility: "visible",display: "none"}).show(1).parent().find('.dropdownlink').addClass('opened');
},function(){
$(this).find('ul:first').css({visibility: "hidden"}).parent().find('.dropdownlink').removeClass('opened');
});*/

$(".navcontent ul:first li:has(ul) a").hover(function(){
$(this).parent().find('ul:first').css({visibility: "visible",display: "none"}).show(1).parent().find('.dropdownlink').addClass('opened');
},function(){
});

$(".navcontent ul:first li:has(ul) a").click(function(){
$(this).parent().find('ul:first').css({visibility: "visible",display: "none"}).show(1).parent().find('.dropdownlink').addClass('opened');
},function(){
});

$(".navcontent ul:first li:has(ul)").hover(function(){
},function(){
$(this).find('ul:first').css({visibility: "hidden"}).parent().find('.dropdownlink').removeClass('opened');
});

$(".navcontent ul:first li:has(ul)").click(function(){
},function(){
$(this).find('ul:first').css({visibility: "hidden"}).parent().find('.dropdownlink').removeClass('opened');
});

---
Class "navcontent" to be replaced with "jquerycssmenu"

Paramasivan
09-27-2011, 05:07 PM
Any help?