开发者

select option hover is not working in IE

I wrote a little code to get some tooltips in my multiple select box, The code is working file in FF but not in IE :(

e开发者_开发百科x:

$('#select > option').mouseover(function(){
  alert($(this).text());
});

Can anyone help me?


onmouseover will not fire for option elements in Internet Explorer. In fact, no mouse or keyboard events fire for option elements. See the msdn documentation for the events available:

http://msdn.microsoft.com/en-us/library/ms535877(VS.85).aspx

EDIT - The same is true of Google Chrome (and most likely Safari too).


Edit: I can't guarantee that it makes hover work for options, but try whatever:hover:

Whatever:hover is a small script that automatically patches :hover, :active and :focus for IE6, IE7 and IE8 quirks, letting you use them like you would in any other browser. Version 3 introduces ajax support, meaning that any html that gets inserted into the document via javascript will also trigger :hover, :active and :focus styles in IE.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜