OZONE Asylum
Forums
CSS - DOM - XHTML - XML - XSL - XSLT
Random :Hover Backgrounds.
This page's ID:
30117
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
Glad that helped. Two last things : 1. changing the class onmouseover shows the previous paint splash for the split of a second. Do the class change onmouseout and put an arbitrary paint_N class in the markup of the LIs and voila. 2. It would be nice if the JavaScript, including the event listener, where not in the markup. Something as simple as the code below should do the trick :[code]onload = function() { var navlist = document.getElementById('navlist'); if( !navlist ) return; navlist.onmouseout = function( event ) { var event = event||window.event; var src = event.target||event.srcElement; // go up until we find the LI or the UL while( src!=navlist && src.nodeName.toLowerCase()!='li' ) src = src.parentNode; // we hit the UL --> ciao if( src==navlist ) return true; // we hit a LI --> change className src.className = 'paint_'+ Math.round( Math.random()* 3 ); // stop propation of the event if possible if( event.stopPropagation ) event.stopPropagation(); return false; } }[/code]Of course that code could/should be beautified and made more generic and "standalone", but it works fine in IE7-8, Op9.5, Ff3 and Sf3 So long, [url=http://www.p01.org/][sigrotate][img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_love.gif[/img]|[img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_love_small.gif[/img]|[img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_charly.gif[/img]|[img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_dk.gif[/img]|[img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_reason.gif[/img]|[img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_galaxy.gif[/img]|[img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_neon88x31.gif[/img]|[img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_teapot.png[/img][/sigrotate][/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »