Skip to content

Commit

Permalink
If custom event is set we do not care if image is below the fold. All…
Browse files Browse the repository at this point in the history
…ways

hide it.
  • Loading branch information
tuupola committed Sep 5, 2007
1 parent c9937e2 commit 88f747a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion enabled.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script src="jquery.lazyload.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
$("img").lazyload({placeholder : "img/grey.gif"});
$("img").lazyload({placeholder : "img/grey.gif", event : "click"});
});
</script>
<style type="text/css">
Expand Down
2 changes: 1 addition & 1 deletion jquery.lazyload.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
var self = this;

$(self).attr("original", $(self).attr("src"));
if ($.belowthefold(self, settings)) {
if (settings.event || $.belowthefold(self, settings)) {
if (settings.placeholder) {
$(self).attr("src", settings.placeholder);
} else {
Expand Down

0 comments on commit 88f747a

Please sign in to comment.