Trying to have a piece of script to change background-image of a element.
i.e.
<DIV style=background-image:url('MyPic1.gif')>
Text Inside Div element
</DIV>
I'm wanting to control it using a eventhandler mouse-over but what code do I use to change the background-image to say 'MyPic2.gif'
Code Tried so far:
<DIV id="Layer0" style="position:absolute;
background-image:url(SideButtonsOut.gif);
Top:20px;Left:10px;width:145px;height:44px;
text-align:center;padding:8px"
onmouseover=this.style.background-image=(SideButtonsIn.gif);
Links
</DIV>
i.e.
<DIV style=background-image:url('MyPic1.gif')>
Text Inside Div element
</DIV>
I'm wanting to control it using a eventhandler mouse-over but what code do I use to change the background-image to say 'MyPic2.gif'
Code Tried so far:
<DIV id="Layer0" style="position:absolute;
background-image:url(SideButtonsOut.gif);
Top:20px;Left:10px;width:145px;height:44px;
text-align:center;padding:8px"
onmouseover=this.style.background-image=(SideButtonsIn.gif);
Links
</DIV>