开发者

JQuery / Javascript Submenu Hover Problem

开发者 https://www.devze.com 2023-02-05 00:18 出处:网络
I have a problem in a jquery dropdow开发者_运维百科n menu. In my example (link in the bottom) I want that when I hover the Submenu the color of the current menu item (item 2) stays in hover state (col

I have a problem in a jquery dropdow开发者_运维百科n menu. In my example (link in the bottom) I want that when I hover the Submenu the color of the current menu item (item 2) stays in hover state (color white in example).

I want this in jquery/javascript and not css.

Link To Live Example with complete Code

Thanks


$("ul.submenu li a").css({'background-color': '#fdfa02'});
$("ul.submenu").css({'background-color': '#fdfa02'});
$("ul.submenu2").css({'background-color': '#fdfa02'});   
$('ul.submenu li a').css('color', '#00FF00');

//change the menu text color on mouse over
$('ul.menu li').hover(function () {    
     $(this).find("span:first a").css({color:'#FFFFFF'});    
},
function () {
    $(this).find("span:first a").css({color:'#000000'});  
});
0

精彩评论

暂无评论...
验证码 换一张
取 消