Alterar imagem - hover


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your 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>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.