Posted By

tscheckenbach on 03/24/10


Tagged

jquery button hover change


Versions (?)

Button tausch


 / Published in: jQuery
 

  1. var $s = jQuery.noConflict();
  2. $s(function() {
  3. $s("img.hover-change")
  4. .mouseover(function() {
  5. var src = $s(this).attr("src").match(/[^\.]+/) + "_over.gif";
  6. $s(this).attr("src", src);
  7. })
  8. .mouseout(function() {
  9. var src = $s(this).attr("src").replace("_over", "");
  10. $s(this).attr("src", src);
  11. });
  12. });

Report this snippet  

You need to login to post a comment.