Posted By

psradich111 on 10/10/11


Tagged

image rollover


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

spee66
Josueriv


jQuery - Easy image rollover


 / Published in: jQuery
 

  1. $(".hover").hover( function() {
  2. var currentImage = $(this).attr("src");
  3. $(this).attr("src", $(this).attr("hover"));
  4. $(this).attr("hover", currentImage);
  5. //css("background-position", "-50px 0");
  6. }, function() {
  7. var currentImage = $(this).attr("src");
  8. $(this).attr("src", $(this).attr("hover"));
  9. $(this).attr("hover", currentImage);
  10. });

Report this snippet  

You need to login to post a comment.