Created
September 29, 2011 18:02
-
-
Save rjungemann/1251440 to your computer and use it in GitHub Desktop.
Make sure an image has loaded using JQuery
This file contains hidden or 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
$.imageComplete = (callback) -> | |
$(this).one('load', callback).each -> if this.complete then $(this).load() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment