Skip to content

Commit

Permalink
Rename checkImages() to update().
Browse files Browse the repository at this point in the history
Used only internally and I prefer oneword function names when possible.
  • Loading branch information
tuupola committed Feb 25, 2012
1 parent 5595fb2 commit abf5cb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions jquery.lazyload.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
load : null
};

checkImages = function() {
update = function() {
var counter = 0;

elements.each(function() {
Expand Down Expand Up @@ -74,7 +74,7 @@
/* Fire one scroll event per scroll. Not one scroll event per image. */
if (0 === settings.event.indexOf("scroll")) {
$container.bind(settings.event, function(event) {
return checkImages();
return update();
});
}

Expand Down Expand Up @@ -127,11 +127,11 @@

/* Check if something appears when window is resized. */
$window.bind("resize", function(event) {
checkImages();
update();
});

/* Force initial check if images should appear. */
checkImages();
update();

return this;
};
Expand Down

0 comments on commit abf5cb0

Please sign in to comment.