Skip to content

Commit

Permalink
adds callback for each image upon load. happens independently of effect
Browse files Browse the repository at this point in the history
  • Loading branch information
longlostnick committed Dec 6, 2011
1 parent 5298470 commit 44a0cda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion jquery.lazyload.js
Expand Up @@ -21,7 +21,8 @@
event : "scroll",
effect : "show",
container : window,
skip_invisible : true
skip_invisible : true,
callback : null
};

if(options) {
Expand Down Expand Up @@ -77,6 +78,9 @@
.attr("src", $(self).data("original"))
[settings.effect](settings.effectspeed);
self.loaded = true;
if (settings.callback) {
settings.callback.call(self);
}
})
.attr("src", $(self).data("original"));
};
Expand Down
2 changes: 1 addition & 1 deletion jquery.lazyload.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 44a0cda

Please sign in to comment.