Ken,
Thanks for the snippet. It was so
short even I could understand the code.
Here's a snippet to modify
the filename on mouseover / mouseout for pngs in IE or whatever browser.
IT checks for the filter style and if present, modifies that attribute, not the
src attribute.
function pngHover(event) {
if(event.type
== 'mouseover') {
if(this.style.filter) // add -hover to
filename on mouseover
this.style.filter =
this.style.filter.replace('.png',
'-hover.png');
else
this.src =
"" '-hover.png');
} else
{
if(this.style.filter) // remove -hover from filename on
mouseout
this.style.filter =
this.style.filter.replace('-hover.png',
'.png');
else
this.src =
"" '.png');
}
}
_______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
