tags:

views:

352

answers:

2

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').mouseover(function(){
  alert($(this).text());
});

Can anyone help me?

A: 

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.

Pekka
Its not setting tooltip only, i want to run some more scripts on hover event.
Devi
I found something that may help you, see my edited answer.
Pekka
Can you provide a sample?
Devi
+2  A: 

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

Andy E