Skip to content

Instantly share code, notes, and snippets.

@robertklep
Created June 6, 2013 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertklep/5720354 to your computer and use it in GitHub Desktop.
Save robertklep/5720354 to your computer and use it in GitHub Desktop.
<!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