Skip to content

Commit 18ea339

Browse files
committed
update README
1 parent c48df8b commit 18ea339

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

README.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,28 @@ Amazon Kindle Fire 2 and HD 8.9, Opera Mini 7.
5656
<td>Dev version:</td>
5757
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.js">jquery.lazyloadxt.js</a></td>
5858
<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>
6059
</tr>
6160
<tr>
6261
<td>Minified version:</td>
6362
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.min.js">jquery.lazyloadxt.min.js</a></td>
6463
<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>
6681
</tr>
6782
</tbody>
6883
</table>
@@ -115,15 +130,12 @@ If you have any feature to request or bug to report please use
115130

116131
## Usage
117132

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:
119134

120135
1. `jquery.lazyloadxt.js`, standard version for lazy loading of images only.
121136

122137
2. `jquery.lazyloadxt.extra.js`, version with included video addon for lazy loading of both images and videos.
123138

124-
3. `jquery.lazyloadxt.simple.js`, version of minimal size with excluded support of on* handlers, lazy* events,
125-
`blankImage` option and addons.
126-
127139
To make media elements (`img`, `video`, `source`, `iframe`) to be lazy loaded, rename `src` attribute to `data-src`.
128140
It is highly recommended to set `width` and `height` attributes. Optionally you can add a placeholder `src` to bypass
129141
HTML validators:
@@ -135,6 +147,9 @@ HTML validators:
135147
<img data-src="lazy.jpg" width="100" height="100">
136148
```
137149

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+
138153

139154
## Demo
140155

@@ -151,7 +166,7 @@ There are two ways to initialize elements if auto initialization doesn't suit yo
151166
For example, `$(container).find(selector).lazyLoadXT();` initializes elements matching `selector` inside `container`.
152167

153168
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`.
155170

156171
Note: don’t forget to disable auto initialization with `$.lazyLoadXT.autoInit=false;` if you like to use manual
157172
initialization of all elements.
@@ -241,7 +256,8 @@ jQuery's `ready` event).
241256
Lazy Load XT plugin triggers following events for loading elements (after call to corresponding handler in
242257
`$.lazyLoadXT` options):
243258

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
245261
* `lazyshow`, element appears in viewport area
246262
* `lazyload`, element is successfully loaded
247263
* `lazyerror`, browser cannot load the element
@@ -729,7 +745,7 @@ doesn't affect loading of CSSes and JavaScripts, and time to initial website ren
729745
730746
Options:
731747
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)
733749
734750
Demo: http://ressio.github.io/lazy-load-xt/demo/autoload.htm
735751
@@ -776,18 +792,24 @@ function addLazyLoading($html) {
776792
777793
Lazy Load XT may be loaded from [jsDelivr CDN](http://www.jsdelivr.com/#!jquery.lazyloadxt)
778794
```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">
780796
```
781797
or [CDNJS CDN](http://cdnjs.com/libraries/jquery.lazyloadxt/)
782798
```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">
784800
```
785801
786802
Note that any of Lazy Load XT `dist` files may be loaded from CDN, not only `jquery.lazyloadxt.min.js`.
787803
788804
789805
## Version History
790806
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+
791813
- [**0.8.12**](https://github.com/ressio/lazy-load-xt/tree/0.8.12) (12.01.2014): significant performance improvement,
792814
fix work in BlackBerry 5, fix `checkDuplicates` options
793815
- [**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

Comments
 (0)