Load an image with a fade in


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



Copy this code and paste it in your HTML
  1. function ChangeImage()
  2. {
  3. $('#some_image').hide()
  4. .load(function () {
  5. $(this).fadeIn();
  6. })
  7. .attr('src', 'http://www.gravatar.com/avatar/cfdd593cc22253bfd5c924a11c61fcc5?s=128&d=identicon&r=PG');
  8. }

URL: http://jsbin.com/ejesu/100/edit

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.