Skip to content

Commit f559411

Browse files
committed
1.7.4
- added 'force' function - fixed usage of deprecated 'load' event - added dev dependency badge to plugins readme
1 parent c6d53db commit f559411

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ Some examples below:
6565
Lazy and all plugins are available over [cdnjs](http://cdnjs.com) and [jsDelivr](http://jsdelivr.com) CDN and can directly included to every page.
6666
```HTML
6767
<!-- jsDeliver -->
68-
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazy/1.7.3/jquery.lazy.min.js"></script>
69-
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazy/1.7.3/jquery.lazy.plugins.min.js"></script>
68+
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazy/1.7.4/jquery.lazy.min.js"></script>
69+
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery.lazy/1.7.4/jquery.lazy.plugins.min.js"></script>
7070

7171
<!-- cdnjs -->
72-
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.3/jquery.lazy.min.js"></script>
73-
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.3/jquery.plugins.min.js"></script>
72+
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.4/jquery.lazy.min.js"></script>
73+
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.4/jquery.plugins.min.js"></script>
7474
```
7575

7676
#### Self-Hosted
@@ -137,6 +137,7 @@ instance.config(entryName[, newValue]); // get or set an configuration entry
137137
instance.addItems(items); // add new items to current instance
138138
instance.getItems(); // get all unhandled items left of current instance
139139
instance.update([useThrottle]); // loads all elements in current viewport
140+
instance.force(items); // force loading specific items, ignoring the viewport
140141
instance.loadAll(); // loads all remaining available elements from this instance
141142
instance.destroy(); // unbinds all events and stop execution directly
142143
```

gulpfile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
var gulp = require("gulp");
44
var util = require("gulp-util");
55
var data = require("gulp-data");
6+
var noop = require("gulp-noop");
67
var rename = require("gulp-rename");
78
var header = require("gulp-header");
89
var jshint = require("gulp-jshint");
@@ -42,7 +43,7 @@ var pipes = {};
4243
pipes.validateFiles = function(files) {
4344
return gulp.src(files, {base: "./"})
4445
.pipe(jshint())
45-
.pipe(jshint.reporter("jshint-stylish"))
46+
.pipe(jshint.reporter("jshint-stylish"));
4647
};
4748

4849
// check all files

jquery.lazy.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* jQuery & Zepto Lazy - v1.7.4.rc1
2+
* jQuery & Zepto Lazy - v1.7.4
33
* http://jquery.eisbehr.de/lazy/
44
*
55
* Copyright 2012 - 2016, Daniel 'Eisbehr' Kern
@@ -223,6 +223,7 @@
223223
// create function to force loading elements
224224
events.f = function(forcedItems) {
225225
for( var i = 0; i < forcedItems.length; i++ ) {
226+
// only handle item if available in current instance
226227
var item = items.filter(forcedItems[i]);
227228

228229
if( item.length ) {

jquery.lazy.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jquery-lazy",
33
"title": "jQuery & Zepto Lazy - Delayed Content, Image and Background Loader",
4-
"version": "1.7.3",
4+
"version": "1.7.4",
55
"description": "Lazy is a fast, feature-rich and lightweight delayed content loading plugin for jQuery and Zepto. It's designed to speed up page loading times and decrease traffic to your users by only loading the content in view.",
66
"main": "jquery.lazy.js",
77
"homepage": "http://jquery.eisbehr.de/lazy",
@@ -52,6 +52,7 @@
5252
"gulp-data": "^1.2.1",
5353
"gulp-header": "^1.8.8",
5454
"gulp-jshint": "^2.0.1",
55+
"gulp-noop": "^1.0.0",
5556
"gulp-rename": "^1.2.2",
5657
"gulp-uglify": "^1.5.4",
5758
"gulp-util": "^3.0.7",
@@ -63,4 +64,4 @@
6364
"watch": "gulp watch",
6465
"build": "gulp build"
6566
}
66-
}
67+
}

plugins/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
[![GitHub version](https://badge.fury.io/gh/eisbehr-%2Fjquery.lazy.svg)](http://github.com/eisbehr-/jquery.lazy)
33
[![NPM version](https://badge.fury.io/js/jquery-lazy.svg)](http://www.npmjs.org/package/jquery-lazy)
44
[![Bower version](https://badge.fury.io/bo/jquery-lazy.svg)](http://bower.io/search/?q=jquery-lazy)
5-
[![Dependency version](https://david-dm.org/eisbehr-/jquery.lazy.png)](https://david-dm.org/eisbehr-/jquery.lazy)
5+
[![Dependencies Status](https://david-dm.org/eisbehr-/jquery.lazy/status.svg)](https://david-dm.org/eisbehr-/jquery.lazy)
6+
[![devDependencies Status](https://david-dm.org/eisbehr-/jquery.lazy/dev-status.svg)](https://david-dm.org/eisbehr-/jquery.lazy?type=dev)
67

78
---
89

0 commit comments

Comments
 (0)