jQuery run code after image loads


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

Taken from TVIDesign's 25 Excellent jQuery tips


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.tvidesign.co.uk/blog/improve-your-jquery-25-excellent-tips.aspx

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.