views:

42

answers:

1

Link to menu: Professional dropdown #2

I was wondering if these posts Suckerfish meets jQuery or Son of Suckerfish dropdowns in jQuery could optimize the menu above.

I need the menu to be optimized for IE6, because when I use the menu as it is, the menu hangs after I click on a menu item that loads a page with heavy processing. It takes too long for the menu to be enabled again.

Any ideas?

A: 

If you change this line (very last one in the script):

if (window.attachEvent) window.attachEvent("onload", stuHover);

To this:

$(stuHover);

It'll load much faster :)

Currently it's rigged to the equivalent of $(window).load() in jQuery, just because in vanilla JS this is easiest to do. But, this means all images, etc have to be loaded before it executes...you just need the elements there, which is what $(stuHover) will do. If this looks confusing, just think of $(function() { }); passing a function to the jQuery constructor just executes it on document.ready.
See here for details :)

Nick Craver