Skip to content
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 3 additions and 2 deletions.
  1. +1 −0 Docs/LazyLoad.md
  2. +1 −1 Source/LazyLoad.js
  3. +1 −1 package.yml
View
1 Docs/LazyLoad.md
@@ -27,6 +27,7 @@ LazyLoad Method: constructor {#LazyLoad:constructor}
* elements - (*string*, defaults to 'img') The elements to apply LazyLoad to.
* container - (*element*, defaults to window) The container of any images for LazyLoad to be applied to.
* mode - (*string*, defaults to 'vertical') The scroll mode ('vertical' or 'horizontal').
+* useFade - (*boolean*, defaults to true) Notes if images should fade in when loaded
### Returns:
View
2 Source/LazyLoad.js
@@ -46,7 +46,7 @@ var LazyLoad = new Class({
var axis = (this.options.mode == "vertical" ? "y": "x");
// Calculate the offset
- var offset = (this.container != document.body ? this.container : "");
+ var offset = (this.container != window && this.container != document.body ? this.container : "");
// Find elements remember and hold on to
this.elements = this.elements.filter(function(el) {
View
2 package.yml
@@ -1,6 +1,6 @@
name: LazyLoad
author: davidwalsh
-current: 2.1
+current: 2.2
category: Media
tags: [lazyload,images,media,load]
docs: http://davidwalsh.name/js/lazyload

No commit comments for this range

Something went wrong with that request. Please try again.