Skip to content

Instantly share code, notes, and snippets.

@kaseybon
Created December 4, 2013 21:18
Show Gist options
  • Save kaseybon/7795753 to your computer and use it in GitHub Desktop.
Save kaseybon/7795753 to your computer and use it in GitHub Desktop.
jQuery - Run a function after all images in a certain element have loaded. When calculating heights the function usually runs before the images have loaded giving inaccurate calculations. This will fun the function again each time an image loads.
$('.container-class').find('img').load(function() {
functionToRun();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment