views:

676

answers:

2

I'm using jQuery's hover() helper to attach some behavior to <li> elements in a <ul> with max-height and overflow:auto CSS properties.

When the height of the <ul> goes beyond max-height and the vertical scrollbar appears, hovering over the <li> elements triggers mouseOver, but if I move to the right to the scrollbar and start scrolling with the mouse, the mouseOut event never fires. (I have to hover back on the element and exit through some other direction to make mouseOut fire).

Is this a problem in jQuery or is it my specific situation that's triggering the bug?

Note: the <li> elements have display:block attached to them.

A: 

Is this a browser specific problem? It sounds like everything you want to happen could more efficiently be completed using the hover pseudo-class of CSS. Also if the li elements are set to display block they will not have numbers or bullets associated with them in some browsers, because those browsers require the use of display:list-item to process elements with list item presentation.

Here is an example of hover from CSS:

ul:hover {height:10em;}

This is happening in Firefox 3. I don't need bullets so that's no problem. The :hover pseudo-class does not work in IE6 (which I still need to support).
Dan
hover does work in IE6 on anchor elements. For an example how this is used to modify a list go to travelocity.com (the US or Canada version) and checkout the top navbar on the homepage.
+2  A: 

Appears to be a bug in Firefox only - jQuery bugtracker has an open ticket here.

Shaun Mahood
That ticket contains a good workaround. I've made some little fix (see my comment for the ticket), and all is working pretty well for me now.
thorn