detect if an image has been loaded


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



Copy this code and paste it in your HTML
  1. $('#myImage').attr('src', 'image.jpg').load(function() {
  2. alert('Image Loaded');
  3. });

URL: http://www.catswhocode.com/blog/10-jquery-snippets-for-efficient-developers

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.