Skip to content

Commit

Permalink
Rename failurelimit to failure_limit. I can't seem to decide my own CS.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuupola committed Dec 1, 2011
1 parent 8abd41b commit 3e6c8cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.textile
Expand Up @@ -5,14 +5,15 @@ h4. 1.6.0
* Rename original attribute to data-original to be HTML5 friendly.
* Remove all code regarding placeholder and automatically removing src attribute. It does not work with modern browsers. Must use data-original attribute instead.
* Add support for James Padolseys "scrollstop event":http://james.padolsey.com/javascript/special-scroll-events-for-jquery/. Use when you have hundreds of images.
* Add _show_invisible_ parameter. When false plugin will skip invisible images. Patch by "Valentin Zwick":https://github.com/vzwick.

h4. 1.5.0

* Support for removing the src attribute already in HTML. This is not a drop in solution but gives additional speed for those who need it. Modified patch by Jeremy Pollock.

h4. 1.4.0

* When scrolling down quickly do not load the images above the top (patch by Bart Bruil).
* When scrolling down quickly do not load the images above the top. Patch by Bart Bruil.

h4. 1.3.2

Expand Down
10 changes: 8 additions & 2 deletions jquery.lazyload.js
Expand Up @@ -17,14 +17,20 @@
$.fn.lazyload = function(options) {
var settings = {
threshold : 0,
failurelimit : 0,
failure_limit : 0,
event : "scroll",
effect : "show",
container : window,
show_invisible : true
};

if(options) {
/* Maintain BC for a couple of version. */
if (null !== options.failurelimit) {
options.failure_limit = options.failurelimit;
delete options.failurelimit;
}

$.extend(settings, options);
}

Expand All @@ -42,7 +48,7 @@
!$.rightoffold(this, settings)) {
$(this).trigger("appear");
} else {
if (counter++ > settings.failurelimit) {
if (counter++ > settings.failure_limit) {
return false;
}
}
Expand Down

0 comments on commit 3e6c8cc

Please sign in to comment.