Created
December 4, 2013 21:18
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.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