![]() |
Image Swap
I would like to do an image swap on my products page for my buy now button. Anyone know how to do this. I keep getting a php tag error when I put javaScript in the home.tpl file. It also slows the page load way down. I tried calling it from an external file but it was still slooooow and the swap did not work.
|
Re: Image Swap
Anyone? I have a really sweet orange button I want to use with my really sweet blue button!!! :(
|
Re: Image Swap
Just use onmouseover/onmouseout to call different classes in CSS
|
Re: Image Swap
man...
I added this to the product.tpl <td align="center" width="200px" height="37px" onmouseover="this.class.name='atcButton2'" onmouseout="this.class.name='atcButton1'"><A href="javascript: document.orderform.submit();">Add to Cart</a></td> and this to my css file td.atcButton1{ background:#ffffff url(images/atcButton.gif) no-Repeat; } td.atcButton2{ background:#ffffff url(images/atcButton2.gif) no-Repeat; } I even tried it with an internal style and nothing... am I calling it right? |
Re: Image Swap
ended up using this....
<tr> <td align="center"><a href="javascript: document.orderform.submit();" onmouseover="document.atcButton.src='skin1/images/atcButton2.gif';" onmouseout="document.atcButton.src='skin1/images/atcButton.gif';"> <img name="atcButton" src="skin1/images/atcButton.gif" width="200px" height="37px" /> </a> </td> </tr> |
All times are GMT -8. The time now is 01:31 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.