Skip to content

Commit

Permalink
1.6.5
Browse files Browse the repository at this point in the history
- change dates to 2016
- some readme cleanup
  • Loading branch information
dkern committed Jan 18, 2016
1 parent be97451 commit bbeb5b7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 33 deletions.
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ First of all, you will need a copy of [jQuery](http://jquery.com) to use Lazy su
Lazy is available over [cdnjs](http://cdnjs.com) and [jsDelivr](http://jsdelivr.com) CDN and can directly included to every page.
```HTML
<!-- cdnjs -->
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/0.6.4/jquery.lazy.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.6.5/jquery.lazy.min.js"></script>

<!-- jsDeliver -->
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazy/0.6.4/jquery.lazy.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazy/1.6.5/jquery.lazy.min.js"></script>
```

#### Self-Hosted
Expand Down Expand Up @@ -140,7 +140,7 @@ To use this just define a loader function inside the Lazy initialisation and pas
<div class="lazy" data-loader="asyncLoader"></div>
```
```JS
$(".lazy").lazy({
$(".lazy").Lazy({
// callback
beforeLoad: function(element) {
console.log("start loading " + element.prop("tagName"));
Expand All @@ -165,35 +165,35 @@ The following configurations is available by default:

Name | Type | Default | Description
--------------- | ---------- | ------------- | -----------
chainable | *boolean* | *true* | <sub>By default Lazy is chainable and will return all elements. If set to `false` Lazy will return the created plugin instance itself for further use.</sub>
autoDestroy | *boolean* | *true* | <sub>Will automatically destroy the instance when no further elements are available to handle.</sub>
bind | *string* | *load* | <sub>If set to `load`' Lazy starts working directly after page load. If you want to use Lazy on own events set it to `event`'.</sub>
threshold | *integer* | *500* | <sub>Amount of pixels below the viewport, in which all images gets loaded before the user sees them.</sub>
visibleOnly | *boolean* | *false* | <sub>Determine if only visible elements should be load.</sub>
appendScroll | *integer* | *window* | <sub>An element to listen on for scroll events, useful when images are stored in a container.</sub>
scrollDirection | *string* | *both* | <sub>Determines the handles scroll direction. Possible values are `both`, `vertical` and `horizontal`.</sub>
imageBase | *string* | *null* | <sub>If defined this will be used as base path for all images loaded by this instance.</sub>
defaultImage | *string* | *blank image* | <sub>Base64 image string, set as default image source for every image without a predefined source attribute.</sub>
placeholder | *string* | *null* | <sub>Base64 image string, set a background on every element as loading placeholder.</sub>
delay | *integer* | *-1* | <sub>If you want to load all elements at once after page load, then you can specify a delay time in milliseconds.</sub>
combined | *boolean* | *false* | <sub>With this parameter, Lazy will combine the event driven and delayed element loading.</sub>
chainable | *boolean* | *true* | By default Lazy is chainable and will return all elements. If set to `false` Lazy will return the created plugin instance itself for further use.
autoDestroy | *boolean* | *true* | Will automatically destroy the instance when no further elements are available to handle.
bind | *string* | *load* | If set to `load`' Lazy starts working directly after page load. If you want to use Lazy on own events set it to `event`'.
threshold | *integer* | *500* | Amount of pixels below the viewport, in which all images gets loaded before the user sees them.
visibleOnly | *boolean* | *false* | Determine if only visible elements should be load.
appendScroll | *integer* | *window* | An element to listen on for scroll events, useful when images are stored in a container.
scrollDirection | *string* | *both* | Determines the handles scroll direction. Possible values are `both`, `vertical` and `horizontal`.
imageBase | *string* | *null* | If defined this will be used as base path for all images loaded by this instance.
defaultImage | *string* | *blank image* | Base64 image string, set as default image source for every image without a predefined source attribute.
placeholder | *string* | *null* | Base64 image string, set a background on every element as loading placeholder.
delay | *integer* | *-1* | If you want to load all elements at once after page load, then you can specify a delay time in milliseconds.
combined | *boolean* | *false* | With this parameter, Lazy will combine the event driven and delayed element loading.
**attributes** | | |
attribute | *string* | *data-src* | <sub>Name of the image tag attribute, where the image path is stored.</sub>
retinaAttribute | *string* | *data-retina* | <sub>Name of the image tag attribute, where the path for optional retina image is stored.</sub>
loaderAttribute | *string* | *data-loader* | <sub>Name or the element attribute, where the identifier of the customer loader is sored.</sub>
removeAttribute | *boolean* | *true* | <sub>Determine if the attribute should be removed from the element after loading.</sub>
handledName | *string* | *handled* | <sub>Name of the element tag data attribute, to determine if element is already handled.</sub>
attribute | *string* | *data-src* | Name of the image tag attribute, where the image path is stored.
retinaAttribute | *string* | *data-retina* | Name of the image tag attribute, where the path for optional retina image is stored.
loaderAttribute | *string* | *data-loader* | Name or the element attribute, where the identifier of the customer loader is sored.
removeAttribute | *boolean* | *true* | Determine if the attribute should be removed from the element after loading.
handledName | *string* | *handled* | Name of the element tag data attribute, to determine if element is already handled.
**effect** | | |
effect | *string* | *show* | <sub>Function name of the effect you want to use to show the loaded images, like `show` or `fadein`.</sub>
effectTime | *integer* | *0* | <sub>Time in milliseconds the effect should use to view the image.</sub>
effect | *string* | *show* | Function name of the effect you want to use to show the loaded images, like `show` or `fadein`.
effectTime | *integer* | *0* | Time in milliseconds the effect should use to view the image.
**throttle** | | |
enableThrottle | *boolean* | *true* | <sub>Throttle down the loading calls on scrolling event.</sub>
throttle | *integer* | *250* | <sub>Time in milliseconds the throttle will use to limit the loading calls.</sub>
enableThrottle | *boolean* | *true* | Throttle down the loading calls on scrolling event.
throttle | *integer* | *250* | Time in milliseconds the throttle will use to limit the loading calls.
**callbacks** | | |
beforeLoad | *function* | *null* | <sub>Callback function, which will be called before the element gets loaded. Has current element as parameter.</sub>
afterLoad | *function* | *null* | <sub>Callback function, which will be called after the element was loaded. Has current element as parameter.</sub>
onError | *function* | *null* | <sub>Callback function, which will be called if the element could not be loaded. Has current element as parameter.</sub>
onFinishedAll | *function* | *null* | <sub>Callback function, which will be called after all elements was loaded or returned an error. This callback has no parameter.</sub>
beforeLoad | *function* | *null* | Callback function, which will be called before the element gets loaded. Has current element as parameter.
afterLoad | *function* | *null* | Callback function, which will be called after the element was loaded. Has current element as parameter.
onError | *function* | *null* | Callback function, which will be called if the element could not be loaded. Has current element as parameter.
onFinishedAll | *function* | *null* | Callback function, which will be called after all elements was loaded or returned an error. This callback has no parameter.


## Bugs / Feature request
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jquery-lazy",
"description": "Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery. It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view. You can use Lazy in all vertical and horizontal scroll ways. It supports images in 'img' tags and backgrounds, supplied with css like 'background-image', by default or any other content by custom loaders. On images Lazy can set an default image or a placeholder while loading and supports retina displays as well.",
"version": "0.6.4",
"version": "1.6.5",
"main": "jquery.lazy.min.js",
"license": [
"MIT",
Expand Down
4 changes: 2 additions & 2 deletions jquery.lazy.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*!
* jQuery Lazy - v0.6.4
* jQuery Lazy - v1.6.5
* http://jquery.eisbehr.de/lazy/
*
* Copyright 2012 - 2015, Daniel 'Eisbehr' Kern
* Copyright 2012 - 2016, Daniel 'Eisbehr' Kern
*
* Dual licensed under the MIT and GPL-2.0 licenses:
* http://www.opensource.org/licenses/mit-license.php
Expand Down
2 changes: 1 addition & 1 deletion jquery.lazy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jquery-lazy",
"title": "jQuery Lazy - Delayed Content, Image and Background Loader",
"version": "0.6.4",
"version": "1.6.5",
"description": "Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery. It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view.",
"homepage": "http://jquery.eisbehr.de/lazy/",
"bugs": "http://github.com/eisbehr-/jquery.lazy/issues",
Expand Down

0 comments on commit bbeb5b7

Please sign in to comment.