-
-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
339 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ Version 8.x - [versions info](#versions-information) | |
Version 10.x - [versions info](#versions-information) | ||
|
||
```html | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/10.16.1/lazyload.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/10.16.2/lazyload.min.js"></script> | ||
``` | ||
|
||
The file `lazyload.min.js` is provided as UMD (<small>Universal Module Definition</small>). | ||
|
@@ -45,7 +45,7 @@ You can do it with the following script: | |
(function(w, d){ | ||
var b = d.getElementsByTagName('body')[0]; | ||
var s = d.createElement("script"); | ||
var v = !("IntersectionObserver" in w) ? "8.15.0" : "10.16.1"; | ||
var v = !("IntersectionObserver" in w) ? "8.15.0" : "10.16.2"; | ||
s.async = true; // This includes the script as async. See the "recipes" section for more information about async loading of LazyLoad. | ||
s.src = "https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/" + v + "/lazyload.min.js"; | ||
w.lazyLoadOptions = {/* Your options here */}; | ||
|
@@ -71,7 +71,7 @@ define("vanilla-lazyLoad", ["https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazy | |
You can also [conditionally load](#conditional-load) the best version. | ||
|
||
```js | ||
var v = !("IntersectionObserver" in window) ? "8.15.0" : "10.16.1"; | ||
var v = !("IntersectionObserver" in window) ? "8.15.0" : "10.16.2"; | ||
define("vanilla-lazyLoad", ["https://cdnjs.cloudflare.com/ajax/libs/vanilla-lazyload/" + v + "/lazyload.amd.min.js"], function (LazyLoad) { | ||
return LazyLoad; | ||
}); | ||
|
@@ -92,7 +92,7 @@ npm install [email protected] | |
Version 10.x - [versions info](#versions-information) | ||
|
||
``` | ||
npm install [email protected].1 | ||
npm install [email protected].2 | ||
``` | ||
|
||
#### Install with bower | ||
|
@@ -726,7 +726,7 @@ Here's the list of the options. | |
| `class_loaded` | The class applied to the elements when the loading is complete | `"loaded"` | | ||
| `class_error` | The class applied to the elements when the element causes an error | `"error"` | | ||
| `to_webp` | A boolean flag that activates the dynamic switch to WEBP feature. [More info](#switch-to-webp). | `false` | | ||
| `load_delay` | [**Available only in version 10.16.1-beta**] The time (in milliseconds) each image needs to stay inside the viewport before its loading begins. | `0` | | ||
| `load_delay` | [**Available only in version 10.16.2-beta**] The time (in milliseconds) each image needs to stay inside the viewport before its loading begins. | `0` | | ||
| `callback_enter` | A function to be called when the DOM element enters the viewport. | `null` | | ||
| `callback_set` | A function to be called after the src of an image is set in the DOM. | `null` | | ||
| `callback_load` | A function to be called when an element was loaded. | `null` | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.