Posted By

rbulgueroni on 10/21/10


Tagged

script jquery img gallery


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

superman


Alterar imagem - hover


 / Published in: jQuery
 

URL: http://www.lordfury.net/AssociatedContent/Associated%20Content%20Uploads/jQueryRound2/ImageReplacementGal.html

  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3. $("div.profCores ul li a").hover(function() {
  4.  
  5. var largePath = $(this).attr("href");
  6. var largeAlt = $(this).attr("title");
  7.  
  8. $("#largeImg").attr({ src: largePath, alt: largeAlt });
  9.  
  10. return false;
  11. });
  12.  
  13. });
  14. </script>
  15.  
  16. <img src="img/imgBlank.gif" alt="Santher" id="largeImg" />
  17. <div class="profCores">
  18. <strong>Cores Dispon�­veis:</strong>
  19. <ul>
  20. <li><a href="img/imgBlank2.gif" class="btnCor1" onclick="javascript:mudaImg('abrirFoto','img/imgBlank2.gif');">cor 1</a></li>
  21. <li><a href="img/imgBlank3.gif" class="btnCor2">cor 2</a></li>
  22. <li><a href="img/imgBlank4.gif" class="btnCor3">cor 3</a></li>
  23. <li><a href="img/imgBlank5.gif" class="btnCor4">cor 4</a></li>
  24. <li><a href="img/imgBlank6.gif" class="btnCor5">cor 5</a></li>
  25. </ul>
  26. </div>

Report this snippet  

You need to login to post a comment.