Created
June 6, 2013 09:22
-
-
Save robertklep/5720354 to your computer and use it in GitHub Desktop.
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
<!doctype html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
</head> | |
<body> | |
<img src="http://lorempixel.com/400/400"> | |
<script> | |
var run = function() { | |
$('img') | |
.one('load', function() { | |
console.log('load triggered'); | |
setTimeout(run, 1000); | |
}) | |
.attr('src', 'http://lorempixel.com/400/400?' + Math.random()); | |
}; | |
run(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment