select option hover is not working in IE

前端 未结 2 1938
终归单人心
终归单人心 2020-12-04 03:03

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 :(

ex:

$(\'#select > option\'         


        
相关标签:
2条回答
  • 2020-12-04 03:40

    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).

    0 讨论(0)
  • 2020-12-04 03:46

    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 讨论(0)
提交回复
热议问题