Quote:
Originally Posted by Jaxel
You should use javascript for this... I hate it when people abuse CSS. Doing things in CSS when its SOOO much easier and more efficient to do it using other methods... Seriously, using CSS to display images? WTF is wrong with IMG tags?
Code:
var restoring = new Array();
function rollover(which, towhat){
restoring[which] = which.src;
which.src = towhat;
}
function rollout(which){
which.src = restoring[which];
}
Code:
<a onmouseover="rollover(imgName, 'newimage.png')" onmouseout="rollout(imgName)" href="link.php"><img src="oldimage.png" name="imgName"></a>
|
But not everybody have activated javascript, so for some cases (this example) it's better to use css.