Posted By

pierre on 06/19/07


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

queweno
wirenaught


Replace image with JS and DOM


 / Published in: JavaScript
 

  1. <!-- script rollover de imagens -->
  2. <script>
  3. var imgPath = 'http://static.gazzag.com/img/';
  4. function switchImg(img, src) {img.src = imgPath + src;}
  5. </script>
  6.  
  7. <img src="http://static.gazzag.com/img/<gazzag:i18nDir />/addfriend.gif" alt="<gazzag:i18n key="addfriend" />" onmouseover="switchImg(this, '<gazzag:i18nDir />/addfriend_hover.gif');" onmouseout="switchImg(this, '<gazzag:i18nDir />/addfriend.gif');" />

Report this snippet  

You need to login to post a comment.