On 14/03/2007, at 6:47 AM, Josh Nathanson wrote:
>> On your site for example moving from "consumer info" to
>> "glasshouse" works
>> smoothly, but the menu doesn't disappear for a few seconds if you
>> move
>> from
>> "glasshouse" to "city of gurya" (in ff2)
>
> Daemach, I think Joel did that on purpose, to allow for mousing
> errors.
> There is a 400 ms onmouseout delay (adjustable) whether mousing
> onto another
> menu item, or just anywhere out of the dropdown.
>
> -- Josh
Daemach, your observation is spot-on. Josh, you are are also right.
The only time the delay does not occur is when mousing to another
menu item *to which the script is attached* ie, list items that have
ul children. The thing that closes the previous item instantly is the
mouseover (or focus with keyboard) of the next one. Therefore the
delay does occur when mousing over an item that does not have a ul
child.
Background info:
I originally tried to make the menu items consistently - as you are
suggesting - by adding the script to all items regardless of whether
they have ul children, but ran into other quirky behaviour. That's
when I decided that the behaviour you see now was acceptable ;) That
said, I just tried having the plugin applied to all menu items
regardless of if ul children exist, and it turns out that other
changes I did after my original testing have solved that quirky
behaviour.
The important bit:
I have altered the plugin (by applying behaviour to $("li",this)
instead of $("li[ul]", this) - all the best changes involve deleting
code :D ) so now the all menu items behave consistently.
Thanks Daemach and Josh (and everyone else!) for your observations
that prompted the change. I have not updated the Blush site with this
yet, but you can see the altered test case on my demo page:
http://users.tpg.com.au/j_birch/plugins/superfish/#example
I have made some menu items not contain ul children to demonstrate
this issue.
Josh, a small detail - I changed the default timer to 500
milliseconds a while ago.
Joel Birch.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/