PDA

View Full Version : special link


Aymen++
05-19-2003, 09:04 AM
i want to make a link that displays a gif picture and when the mouse moves over it changes its gif to another one, and when the mouse leave it changes its gif to the first one...

glenngv
05-19-2003, 10:57 AM
image rollover (http://codingforums.com/search.php?s=&action=showresults&searchid=121662&sortby=lastpost&sortorder=descending)

Weirdan
05-19-2003, 11:06 AM
<script>
function m_over(){
image.src='second.gif';
}

function m_out(){
image.src='first.gif';
}
</script>
<a href='something' onmouseover='m_over()' onmouseout='m_out'><img id='image' src='first.gif'></a>

Aymen++
05-22-2003, 10:14 AM
how to make a cell in a table when the mouse moves over it changes its color?

wox3-iO
05-22-2003, 12:20 PM
<script>
<!--
function light(targ,color, md) {
if (md == 1) {
targ.style.backgroundColor = '#'+color;
} else {
targ.style.backgroundColor = "";
}
}
//-->
</script>
<td onMouseOver="light(this,'000000',1)" onMouseOut="light(this,'000000',0)">My cell</td>


Don't know if a snippet as simple as this can be done any easier...