@@ -56,13 +56,28 @@ Amazon Kindle Fire 2 and HD 8.9, Opera Mini 7.
56
56
<td>Dev version:</td>
57
57
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.js">jquery.lazyloadxt.js</a></td>
58
58
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.extra.js">jquery.lazyloadxt.extra.js</a></td>
59
- <td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.simple.js">jquery.lazyloadxt.simple.js</a></td>
60
59
</tr>
61
60
<tr>
62
61
<td>Minified version:</td>
63
62
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.min.js">jquery.lazyloadxt.min.js</a></td>
64
63
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.extra.min.js">jquery.lazyloadxt.extra.min.js</a></td>
65
- <td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.simple.min.js">jquery.lazyloadxt.simple.min.js</a></td>
64
+ </tr>
65
+ </tbody >
66
+ </table >
67
+
68
+ Effects:
69
+
70
+ <table >
71
+ <tbody >
72
+ <tr>
73
+ <td>Dev version:</td>
74
+ <td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.fadein.css">jquery.lazyloadxt.fadein.css</a></td>
75
+ <td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.spinner.css">jquery.lazyloadxt.spinner.css</a></td>
76
+ </tr>
77
+ <tr>
78
+ <td>Minified version:</td>
79
+ <td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.fadein.min.css">jquery.lazyloadxt.fadein.min.css</a></td>
80
+ <td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.spinner.min.css">jquery.lazyloadxt.spinner.min.css</a></td>
66
81
</tr>
67
82
</tbody >
68
83
</table >
@@ -115,15 +130,12 @@ If you have any feature to request or bug to report please use
115
130
116
131
## Usage
117
132
118
- First of all it's necessary to load jQuery and Lazy Load XT script. There are three versions of Lazy Load XT:
133
+ First of all it's necessary to load jQuery and Lazy Load XT script. There are two versions of Lazy Load XT:
119
134
120
135
1 . ` jquery.lazyloadxt.js ` , standard version for lazy loading of images only.
121
136
122
137
2 . ` jquery.lazyloadxt.extra.js ` , version with included video addon for lazy loading of both images and videos.
123
138
124
- 3 . ` jquery.lazyloadxt.simple.js ` , version of minimal size with excluded support of on* handlers, lazy* events,
125
- ` blankImage ` option and addons.
126
-
127
139
To make media elements (` img ` , ` video ` , ` source ` , ` iframe ` ) to be lazy loaded, rename ` src ` attribute to ` data-src ` .
128
140
It is highly recommended to set ` width ` and ` height ` attributes. Optionally you can add a placeholder ` src ` to bypass
129
141
HTML validators:
@@ -135,6 +147,9 @@ HTML validators:
135
147
<img data-src =" lazy.jpg" width =" 100" height =" 100" >
136
148
```
137
149
150
+ PS. In ` src ` directory you can found ` jquery.lazyloadxt.simple.js ` , it is initial LazyLoadXT version of minimal size
151
+ with excluded support of on* handlers, lazy* events, ` blankImage ` option and addons.
152
+
138
153
139
154
## Demo
140
155
@@ -151,7 +166,7 @@ There are two ways to initialize elements if auto initialization doesn't suit yo
151
166
For example, ` $(container).find(selector).lazyLoadXT(); ` initializes elements matching ` selector ` inside ` container ` .
152
167
153
168
You can pass optional argument to override default ` $.lazyLoadXT ` options. The following options only may be overridden:
154
- ` srcAttr ` , ` edgeX ` , ` edgeY ` , ` visibleOnly ` , ` blankImage ` .
169
+ ` srcAttr ` , ` edgeX ` , ` edgeY ` , ` visibleOnly ` , ` blankImage ` , ` checkDuplicates ` , ` scrollContainer ` .
155
170
156
171
Note: don’t forget to disable auto initialization with ` $.lazyLoadXT.autoInit=false; ` if you like to use manual
157
172
initialization of all elements.
@@ -241,7 +256,8 @@ jQuery's `ready` event).
241
256
Lazy Load XT plugin triggers following events for loading elements (after call to corresponding handler in
242
257
` $.lazyLoadXT ` options):
243
258
244
- * ` lazyinit ` , the plugin push elements into internal list of "lazy" elements
259
+ * ` lazystart ` , (triggered on ` window ` ) before plugin's initialization code (binding to events, etc.)
260
+ * ` lazyinit ` , the plugin push element into internal list of "lazy" elements
245
261
* ` lazyshow ` , element appears in viewport area
246
262
* ` lazyload ` , element is successfully loaded
247
263
* ` lazyerror ` , browser cannot load the element
@@ -729,7 +745,7 @@ doesn't affect loading of CSSes and JavaScripts, and time to initial website ren
729
745
730
746
Options:
731
747
732
- **$.lazyLoadXT.autoLoad ** time interval between ` load` page event and start of image loading (in ms, default is 50)
748
+ **$.lazyLoadXT.autoLoadTime ** time interval between ` load` page event and start of image loading (in ms, default is 50)
733
749
734
750
Demo: http://ressio.github.io/lazy-load-xt/demo/autoload.htm
735
751
@@ -776,18 +792,24 @@ function addLazyLoading($html) {
776
792
777
793
Lazy Load XT may be loaded from [jsDelivr CDN](http://www.jsdelivr.com/#!jquery.lazyloadxt)
778
794
` ` ` html
779
- < script src= " //cdn.jsdelivr.net/jquery.lazyloadxt/0.8.11 /jquery.lazyloadxt.min.js" >
795
+ < script src= " //cdn.jsdelivr.net/jquery.lazyloadxt/1.0.0 /jquery.lazyloadxt.min.js" >
780
796
` ` `
781
797
or [CDNJS CDN](http://cdnjs.com/libraries/jquery.lazyloadxt/)
782
798
` ` ` html
783
- < script src= " //cdnjs.cloudflare.com/ajax/libs/jquery.lazyloadxt/0.8.11 /jquery.lazyloadxt.min.js" >
799
+ < script src= " //cdnjs.cloudflare.com/ajax/libs/jquery.lazyloadxt/1.0.0 /jquery.lazyloadxt.min.js" >
784
800
` ` `
785
801
786
802
Note that any of Lazy Load XT ` dist` files may be loaded from CDN, not only ` jquery .lazyloadxt .min .js ` .
787
803
788
804
789
805
## Version History
790
806
807
+ - [**1.0.0**](https://github.com/ressio/lazy-load-xt/tree/1.0.0) (16.01.2014): new ` forceLoad` option, ` classNojs`
808
+ option is removed in flavour of ` options .oninit .removeClass ` , ` lazyloadall` event is renamed to ` lazycomplete` ,
809
+ new ` oncomplete` option, fix work with Zepto, fix work in some old mobile browsers, default value for ` selector`
810
+ option is set to ` img[data- src]` , lazy* events are triggered after corresponding on* handlers, new ` lazystart` event,
811
+ remove "simple" version from build.
812
+
791
813
- [**0.8.12**](https://github.com/ressio/lazy-load-xt/tree/0.8.12) (12.01.2014): significant performance improvement,
792
814
fix work in BlackBerry 5, fix ` checkDuplicates` options
793
815
- [**0.8.11**](https://github.com/ressio/lazy-load-xt/tree/0.8.11) (10.01.2014): fix to work in browsers without
0 commit comments