Skip to content

Commit 3f1d2ae

Browse files
committed
add bootstrap and jquerymobile addons
1 parent ce1f0a7 commit 3f1d2ae

File tree

7 files changed

+74
-2
lines changed

7 files changed

+74
-2
lines changed

Gruntfile.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ module.exports = function (grunt) {
6161
src: ['src/jquery.<%= pkg.name %>.bg.js'],
6262
dest: 'dist/jquery.<%= pkg.name %>.bg.js'
6363
},
64+
bootstrap: {
65+
src: ['src/jquery.<%= pkg.name %>.bootstrap.js'],
66+
dest: 'dist/jquery.<%= pkg.name %>.bootstrap.js'
67+
},
68+
jquerymobile: {
69+
src: ['src/jquery.<%= pkg.name %>.jquerymobile.js'],
70+
dest: 'dist/jquery.<%= pkg.name %>.jquerymobile.js'
71+
},
6472
picture: {
6573
src: ['src/jquery.<%= pkg.name %>.picture.js'],
6674
dest: 'dist/jquery.<%= pkg.name %>.picture.js'
@@ -108,6 +116,14 @@ module.exports = function (grunt) {
108116
src: '<%= concat.bg.dest %>',
109117
dest: 'dist/jquery.<%= pkg.name %>.bg.min.js'
110118
},
119+
bootstrap: {
120+
src: '<%= concat.bootstrap.dest %>',
121+
dest: 'dist/jquery.<%= pkg.name %>.bootstrap.min.js'
122+
},
123+
jquerymobile: {
124+
src: '<%= concat.jquerymobile.dest %>',
125+
dest: 'dist/jquery.<%= pkg.name %>.jquerymobile.min.js'
126+
},
111127
picture: {
112128
src: '<%= concat.picture.dest %>',
113129
dest: 'dist/jquery.<%= pkg.name %>.picture.min.js'

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- [AJAX](#ajax)
2727
- [Support of IE6/7](#support-of-ie6-7)
2828
- [Addons](#addons)
29+
- [Bootstrap and jQueryMobile](#bootstrap-and-jquerymobile)
2930
- [Video](#video)
3031
- [Responsive images](#responsive-images)
3132
- [Widgets](#widgets)
@@ -113,6 +114,16 @@ Addons:
113114
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.autoload.js">jquery.lazyloadxt.autoload.js</a></td>
114115
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.autoload.min.js">jquery.lazyloadxt.autoload.min.js</a></td>
115116
</tr>
117+
<tr>
118+
<td><a href="#bootstrap-and-jquerymobile">Bootstrap</a></td>
119+
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.bootstrap.js">jquery.lazyloadxt.bootstrap.js</a></td>
120+
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.bootstrap.min.js">jquery.lazyloadxt.bootstrap.min.js</a></td>
121+
</tr>
122+
<tr>
123+
<td><a href="#bootstrap-and-jquerymobile">jQueryMobile</a></td>
124+
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.jquerymobile.js">jquery.lazyloadxt.jquerymobile.js</a></td>
125+
<td><a href="https://raw.github.com/ressio/lazy-load-xt/master/dist/jquery.lazyloadxt.jquerymobile.min.js">jquery.lazyloadxt.jquerymobile.min.js</a></td>
126+
</tr>
116127
</tbody>
117128
</table>
118129

@@ -500,6 +511,14 @@ Lazy Load XT may be easily extended to support other lazyloading-related things.
500511
project and listed below.
501512

502513

514+
### Bootstrap and jQueryMobile
515+
516+
To support [Bootstrap](http://getbootstrap.com/) and [jQueryMobile](http://jquerymobile.com/) frameworks, use
517+
`<script src="jquery.lazyloadxt.bootstrap.js"></script>` and `<script src="jquery.lazyloadxt.jquerymobile.js"></script>`
518+
addons, correspondingly. These addons recheck visible images each time related javascript plugin (e.g. Bootstrap's Carousel
519+
or jQueryMobile's Panel) changes page content.
520+
521+
503522
### Video
504523

505524
Support of video elements in extra version of Lazy Load XT is just an addon that is combined with base version of

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"authors": ["RESS.io"],
77
"homepage": "http://ressio.github.io/lazy-load-xt",
88
"license": "MIT",
9-
"keywords": ["effect", "image", "images", "jquery", "jquerymobile", "lazy", "lazyload", "load", "media", "mobile", "performance", "responsive", "speed", "video", "vimeo", "youtube"],
9+
"keywords": ["effect", "image", "images", "jquery", "jquerymobile", "bootstrap", "lazy", "lazyload", "load", "media", "mobile", "performance", "responsive", "speed", "video", "vimeo", "youtube"],
1010
"dependencies": {
1111
"jquery": ">=1.7.0"
1212
},

package.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,26 @@
1313
"type": "git",
1414
"url": "git://github.com/ressio/lazy-load-xt.git"
1515
},
16-
"keywords": ["jquery-plugin", "effect", "image", "images", "jquery", "jquerymobile", "lazy", "lazyload", "load", "media", "mobile", "performance", "responsive", "speed", "video", "vimeo", "youtube"],
16+
"keywords": [
17+
"jquery-plugin",
18+
"effect",
19+
"image",
20+
"images",
21+
"jquery",
22+
"bootstrap",
23+
"jquerymobile",
24+
"lazy",
25+
"lazyload",
26+
"load",
27+
"media",
28+
"mobile",
29+
"performance",
30+
"responsive",
31+
"speed",
32+
"video",
33+
"vimeo",
34+
"youtube"
35+
],
1736
"bugs": "https://github.com/ressio/lazy-load-xt/issues",
1837
"licenses": [
1938
{

src/jquery.lazyloadxt.bootstrap.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*jslint browser:true, plusplus:true, vars:true */
2+
/*jshint browser:true, jquery:true */
3+
4+
(function ($) {
5+
'use strict';
6+
7+
$.lazyLoadXT.updateEvent += ' shown.bs.modal shown.bs.dropdown shown.bs.tab shown.bs.tooltip shown.bs.popover shown.bs.collapse slid.bs.carousel';
8+
})(window.jQuery || window.Zepto || window.$);

src/jquery.lazyloadxt.jquerymobile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*jslint browser:true, plusplus:true, vars:true */
2+
/*jshint browser:true, jquery:true */
3+
4+
(function ($) {
5+
'use strict';
6+
7+
$.lazyLoadXT.updateEvent += ' collapsibleexpand filterablefilter pagechange panelopen popupafteropen tabsactivate';
8+
})(window.jQuery || window.Zepto || window.$);

test/lazyloadxt-addons.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
<script src="../src/jquery.lazyloadxt.script.js"></script>
1919
<script src="../src/jquery.lazyloadxt.srcset.js"></script>
2020
<script src="../src/jquery.lazyloadxt.widget.js"></script>
21+
<script src="../src/jquery.lazyloadxt.bootstrap.js"></script>
22+
<script src="../src/jquery.lazyloadxt.jquerymobile.js"></script>
2123

2224
<script src="../src/jquery.lazyloadxt.autoload.js"></script>
2325

0 commit comments

Comments
 (0)