...

View Full Version : change td background image on mouseover?



firepages
06-07-2003, 06:28 AM
hi, how can I change the background image of a table cell on mouseover ?

<td width="180" height="22" background="./img/menu.jpg" align="right" id="menu1">
<a href="./link" class="menu_left" onmouseover="swap(this,'menu1')" onmouseout="swap(this,'menu1')">link</a>
</td>

currently swap just does ...

function swap(obj,td){
var col=obj.style.color;
if(col!="red"){
obj.style.color="red";
}else{
obj.style.color="696969";
}
}

I tried all sorts of things to get at the td background image but cant seem to ?

any help much appreciated

PS , just as happy to use a div or span ?

wox3-iO
06-07-2003, 08:53 AM
"How can I set the background image of a table cell"
http://www.faqts.com/knowledge_base/view.phtml/aid/4005/fid/192

This looks pretty good. It may not answer directly to your question, but it should help you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum