Posted By

wanlapat on 02/06/13


Tagged

image opacity jquery hover fade


Versions (?)

Change Image Opacity on Hover


 / Published in: jQuery
 

In scripts.js

  1. $(function() {
  2. $('a img').css("opacity","1.0"); //set initial opacity
  3. $('a img').hover(function() {
  4. $(this).stop().animate({ opacity: 0.75 }, "fast"); //on mouse hover
  5. },
  6. function() {
  7. $(this).stop().animate({ opacity: 1.0 }, "fast"); //on mouse out
  8. });
  9. });

Report this snippet  

You need to login to post a comment.