开发者

this code doesn't work in IE7 could anyone help me?

$("#menu ul li").click(function(){
var colorBorder = $(thi开发者_如何学JAVAs).parent("ul").find("li:hover").css("border-bottom-color");
alert(colorBorder)
});

it works in chrome, opera, firefox, safari, ie9, ie8 but doesn't work in IE7, why?? i think is "li:hover".

http://jsfiddle.net/58sqR/3/


To me, it looks like

$(this).parent("ul").find("li:hover")

will return the same element as

$(this)

Since clicking a li also means hovering over it. Have you tried just using

var colorBorder = $(this).css("border-bottom-color");
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜