This is just an idea, but I think it makes a lot of sense. Is there some reason this wouldn't be better than basically all of the rollover scripts out there?
The markup goes roughly like this:
<img src="over.gif" style="position:absolute;display:none;z-index:5;"><img src="orig.gif">
(Two equal-sized images with the first using position:absolute and a high z-indez and hidden; the second is normal [not absolute].)
Now to allow the rollover, simply add onmouseover to the main [second] image. It uses getElementById() and sets the first image to visible. onmouseout is set to display:none.
Or I believe you could keep the second image self-contained with the JS (mouseover works without visibility, right?).
Just an idea. Perhaps I'm missing something.



Reply With Quote




Bookmarks