OZONE Asylum
Forums
DHTML/Javascript
Elastic menu
This page's ID:
30033
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Just to keep notes as I progress through optimisations : [quote] FIXED : # hovering the highlighted item after leaving the menu makes the items wobble again # bad browsers such as IE6, will fire an HTTP request for each background image swap. Replace them by CSS sprites. Changing the background position is fine. # you should not attach a mouseout and mouseover event handler on each and every navigation item but just once on the div#menu . This is a bajillion times more efficient and elegant than creating an 2 anonymous functions and event handlers for each navigation item !!! MOOT : # I hope you'll overload the window.open( this.href, '_blank' ) by an "AJAX" call. People hate popups. # moot point, but speaking of "AJAX", the loadpage() event handler should also check for a status code 0 in case the content is cached ( I know it's no gonna happen in your case ) TO DO : # you should use a UL LI A #text for the markup of the menu/navigation. That what navigations are : a list of links. # you should really stay away of setTimeout( "someCode", delay ) and similar calls. These create a new JavaScript context to parse "someCode". It costs memory and CPU time. Prefer setTimeout( aFunction, delay ) # limit the number of setTimeout( foo, delay ). Browsers are not multithreaded and allocate time to the JS engine every X ms ( 10-20 on desktop ). Firing many setTimeout( foo, delay ) will produce a burst of CPU usage. [/quote] ...Now how do I go about passing arguments to a function I call through setTimeout? I know the third parameter for setTimeout in Mozilla, but how do I do that in IE?:confused:
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »