diff --git a/README.md b/README.md index 43eb9fc..2344826 100644 --- a/README.md +++ b/README.md @@ -802,6 +802,8 @@ Note that any of Lazy Load XT `dist` files may be loaded from CDN, not only `jqu ## Version History +- [**0.8.10**](https://github.com/ressio/lazy-load-xt/tree/0.8.10) (07.01.2014): bugfix "video" addon, remove loading of + `bootstrap.js` in `zepto.htm` demo. - [**0.8.9**](https://github.com/ressio/lazy-load-xt/tree/0.8.9) (06.01.2014): `checkDuplicates` option, fix srcset addon, speed up work with jQuery - [**0.8.8**](https://github.com/ressio/lazy-load-xt/tree/0.8.8) (26.12.2013): Fix sharing $el.lazyLoadXT object, diff --git a/bower.json b/bower.json index 07098ba..b065d4e 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "lazyloadxt", "description": "Lazy Load XT is mobile-oriented, fast and extensible jQuery plugin for lazy loading of images, videos and other media with built-in support of jQueryMobile framework. It improves performance of website by loading visible media elements only, and elements below the fold are loaded after page scroll. The plugin has many options, supports callbacks and special lazy events, that allows to have different loading effects (e.g. fade in and spinner effects). Examples of plugin and its addons include ajax, background images, infinite scroll, horizontal scroll, iframe-based widgets (YouTube, Vimeo, Google Maps Engine Lite, Facebook recommend button, Google+ profile), html5 video, responsive images with retina support (srcset and picture polyfills), social widgets (embedded tweet, Twitter share button, Google Plus badge and share button, Facebook like and recommend buttons, Facebook post comments), load all images before print, etc. Tested in IE 6-11, Chrome 1-31, Firefox 1.5-27.0, Safari 3-7, Opera 10.6-18.0, iOS 5-7, Android 2.3-4.4, and WP8. Requires jQuery 1.7+ or Zepto 1.0+.", - "version": "0.8.9", + "version": "0.8.10", "main": ["dist/jquery.lazyloadxt.js", "dist/jquery.lazyloadxt.extra.js"], "authors": ["RESS.io"], "homepage": "http://ressio.github.io/lazy-load-xt", diff --git a/dist/jquery.lazyloadxt.autoload.js b/dist/jquery.lazyloadxt.autoload.js index 6c9c41e..1fb694b 100644 --- a/dist/jquery.lazyloadxt.autoload.js +++ b/dist/jquery.lazyloadxt.autoload.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ diff --git a/dist/jquery.lazyloadxt.autoload.min.js b/dist/jquery.lazyloadxt.autoload.min.js index f16a6df..f76de31 100644 --- a/dist/jquery.lazyloadxt.autoload.min.js +++ b/dist/jquery.lazyloadxt.autoload.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ +/* Lazy Load XT 0.8.10 | MIT License */ !function(a){var b=a.lazyLoadXT;b.forceEvent+=" lazyloadall",b.autoLoad=b.autoLoad||50,a(document).ready(function(){setTimeout(function(){a(window).trigger("lazyloadall")},b.autoLoad)})}(window.jQuery||window.Zepto); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.bg.js b/dist/jquery.lazyloadxt.bg.js index 2782726..494fe0f 100644 --- a/dist/jquery.lazyloadxt.bg.js +++ b/dist/jquery.lazyloadxt.bg.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ diff --git a/dist/jquery.lazyloadxt.bg.min.js b/dist/jquery.lazyloadxt.bg.min.js index 6ffaca9..b80ddd6 100644 --- a/dist/jquery.lazyloadxt.bg.min.js +++ b/dist/jquery.lazyloadxt.bg.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ +/* Lazy Load XT 0.8.10 | MIT License */ !function(a){var b=a.lazyLoadXT,c=b.bgAttr||"data-bg";b.selector+=",["+c+"]",a(document).on("lazyshow",function(b){var d=a(b.target);d.css("background-image","url('"+d.attr(c)+"')").removeAttr(c)})}(window.jQuery||window.Zepto); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.extra.js b/dist/jquery.lazyloadxt.extra.js index 71a0fc0..ea496a4 100644 --- a/dist/jquery.lazyloadxt.extra.js +++ b/dist/jquery.lazyloadxt.extra.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ @@ -276,7 +276,7 @@ options.videoPoster = 'data-poster'; $(document).on('lazyshow', 'video', function (e, $el) { - var srcAttr = $el.srcAttr, + var srcAttr = $el.lazyLoadXT.srcAttr, isFuncSrcAttr = $.isFunction(srcAttr); $el diff --git a/dist/jquery.lazyloadxt.extra.min.js b/dist/jquery.lazyloadxt.extra.min.js index 5028666..cdd6537 100644 --- a/dist/jquery.lazyloadxt.extra.min.js +++ b/dist/jquery.lazyloadxt.extra.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ -!function(a,b,c,d){function e(){m=s.scrollTop(),n=m+(b.innerHeight||s.height()),o=b.pageXOffset||0,p=o+(b.innerWidth||s.width())}function f(b,c){c.trigger("lazy"+b,[c]);var d=q["on"+b];d&&(a.isFunction(d)?d.call(c[0]):c.addClass(d.addClass).removeClass(d.removeClass)),j()}function g(b){f(b.type,a(this).off("load error",g))}function h(b){if(u.length){w=1/0,e();for(var d=u.length-1;d>=0;d--){var h=u[d],i=h[0],j=h.lazyLoadXT;if(a.contains(c.documentElement,i)){if(b||!j.visibleOnly||i.offsetWidth>0||i.offsetHeight>0){var k=h.offset(),l=k.top,q=k.left,r=j.edgeX,s=j.edgeY,t=l-s;if(b||n>=t&&l+h.height()>m-s&&p+r>=q&&q+h.width()>o-r){f("show",h);var v=j.srcAttr,x=a.isFunction(v)?v(h):h.attr(v);x&&h.on("load error",g).attr("src",x),u.splice(d,1)}else w>t&&(w=t)}}else u.splice(d,1)}u.length||a(c).trigger("lazyloadall")}}function i(){x>1?(x=1,h(),setTimeout(i,q.throttle)):x=0}function j(a){u.length&&(a&&"scroll"===a.type&&(e(),w>=n)||(x||setTimeout(i,0),x=2))}function k(){s.lazyLoadXT(),j()}function l(){h(!0)}var m,n,o,p,q={autoInit:!0,selector:"img",classNojs:"lazy",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll",forceEvent:"",oninit:null,onshow:null,onload:null,onerror:null},r={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},s=a(b),t="lazied",u=[],v=a.data||function(b,c){return a(b).data(c)},w=0,x=0;a.lazyLoadXT=a.extend(q,r,a.lazyLoadXT),a.fn.lazyLoadXT=function(c){c=c||{};var e,g={},h=c.blankImage||q.blankImage,i=c.classNojs||q.classNojs,j=c.checkDuplicates||!0;for(e in r)g[e]=c[e]===d?q[e]:c[e];return this.each(function(){if(this===b)a(q.selector).lazyLoadXT(c);else{if(j&&v(this,t))return;var d=a(this);d.data(t,1).removeClass(i),h&&"IMG"===d[0].tagName&&!d.attr("src")&&d.attr("src",h),d.lazyLoadXT=a.extend({},g),f("init",d),u.unshift(d)}})},a(c).ready(function(){s.on(q.loadEvent,k).on(q.updateEvent,j).on(q.forceEvent,l),q.autoInit&&k()})}(window.jQuery||window.Zepto,window,document),function(a){var b=a.lazyLoadXT;b.selector+=",video,iframe[data-src]",b.videoPoster="data-poster",a(document).on("lazyshow","video",function(c,d){var e=d.srcAttr,f=a.isFunction(e);d.attr("poster",d.attr(b.videoPoster)).children("source,track").each(function(){var b=a(this);b.attr("src",f?e(b):b.attr(e))}),this.load()})}(window.jQuery||window.Zepto); \ No newline at end of file +/* Lazy Load XT 0.8.10 | MIT License */ +!function(a,b,c,d){function e(){m=s.scrollTop(),n=m+(b.innerHeight||s.height()),o=b.pageXOffset||0,p=o+(b.innerWidth||s.width())}function f(b,c){c.trigger("lazy"+b,[c]);var d=q["on"+b];d&&(a.isFunction(d)?d.call(c[0]):c.addClass(d.addClass).removeClass(d.removeClass)),j()}function g(b){f(b.type,a(this).off("load error",g))}function h(b){if(u.length){w=1/0,e();for(var d=u.length-1;d>=0;d--){var h=u[d],i=h[0],j=h.lazyLoadXT;if(a.contains(c.documentElement,i)){if(b||!j.visibleOnly||i.offsetWidth>0||i.offsetHeight>0){var k=h.offset(),l=k.top,q=k.left,r=j.edgeX,s=j.edgeY,t=l-s;if(b||n>=t&&l+h.height()>m-s&&p+r>=q&&q+h.width()>o-r){f("show",h);var v=j.srcAttr,x=a.isFunction(v)?v(h):h.attr(v);x&&h.on("load error",g).attr("src",x),u.splice(d,1)}else w>t&&(w=t)}}else u.splice(d,1)}u.length||a(c).trigger("lazyloadall")}}function i(){x>1?(x=1,h(),setTimeout(i,q.throttle)):x=0}function j(a){u.length&&(a&&"scroll"===a.type&&(e(),w>=n)||(x||setTimeout(i,0),x=2))}function k(){s.lazyLoadXT(),j()}function l(){h(!0)}var m,n,o,p,q={autoInit:!0,selector:"img",classNojs:"lazy",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll",forceEvent:"",oninit:null,onshow:null,onload:null,onerror:null},r={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},s=a(b),t="lazied",u=[],v=a.data||function(b,c){return a(b).data(c)},w=0,x=0;a.lazyLoadXT=a.extend(q,r,a.lazyLoadXT),a.fn.lazyLoadXT=function(c){c=c||{};var e,g={},h=c.blankImage||q.blankImage,i=c.classNojs||q.classNojs,j=c.checkDuplicates||!0;for(e in r)g[e]=c[e]===d?q[e]:c[e];return this.each(function(){if(this===b)a(q.selector).lazyLoadXT(c);else{if(j&&v(this,t))return;var d=a(this);d.data(t,1).removeClass(i),h&&"IMG"===d[0].tagName&&!d.attr("src")&&d.attr("src",h),d.lazyLoadXT=a.extend({},g),f("init",d),u.unshift(d)}})},a(c).ready(function(){s.on(q.loadEvent,k).on(q.updateEvent,j).on(q.forceEvent,l),q.autoInit&&k()})}(window.jQuery||window.Zepto,window,document),function(a){var b=a.lazyLoadXT;b.selector+=",video,iframe[data-src]",b.videoPoster="data-poster",a(document).on("lazyshow","video",function(c,d){var e=d.lazyLoadXT.srcAttr,f=a.isFunction(e);d.attr("poster",d.attr(b.videoPoster)).children("source,track").each(function(){var b=a(this);b.attr("src",f?e(b):b.attr(e))}),this.load()})}(window.jQuery||window.Zepto); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.js b/dist/jquery.lazyloadxt.js index f49ac91..d44615e 100644 --- a/dist/jquery.lazyloadxt.js +++ b/dist/jquery.lazyloadxt.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ diff --git a/dist/jquery.lazyloadxt.min.js b/dist/jquery.lazyloadxt.min.js index 4e832ff..dc812b0 100644 --- a/dist/jquery.lazyloadxt.min.js +++ b/dist/jquery.lazyloadxt.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ +/* Lazy Load XT 0.8.10 | MIT License */ !function(a,b,c,d){function e(){m=s.scrollTop(),n=m+(b.innerHeight||s.height()),o=b.pageXOffset||0,p=o+(b.innerWidth||s.width())}function f(b,c){c.trigger("lazy"+b,[c]);var d=q["on"+b];d&&(a.isFunction(d)?d.call(c[0]):c.addClass(d.addClass).removeClass(d.removeClass)),j()}function g(b){f(b.type,a(this).off("load error",g))}function h(b){if(u.length){w=1/0,e();for(var d=u.length-1;d>=0;d--){var h=u[d],i=h[0],j=h.lazyLoadXT;if(a.contains(c.documentElement,i)){if(b||!j.visibleOnly||i.offsetWidth>0||i.offsetHeight>0){var k=h.offset(),l=k.top,q=k.left,r=j.edgeX,s=j.edgeY,t=l-s;if(b||n>=t&&l+h.height()>m-s&&p+r>=q&&q+h.width()>o-r){f("show",h);var v=j.srcAttr,x=a.isFunction(v)?v(h):h.attr(v);x&&h.on("load error",g).attr("src",x),u.splice(d,1)}else w>t&&(w=t)}}else u.splice(d,1)}u.length||a(c).trigger("lazyloadall")}}function i(){x>1?(x=1,h(),setTimeout(i,q.throttle)):x=0}function j(a){u.length&&(a&&"scroll"===a.type&&(e(),w>=n)||(x||setTimeout(i,0),x=2))}function k(){s.lazyLoadXT(),j()}function l(){h(!0)}var m,n,o,p,q={autoInit:!0,selector:"img",classNojs:"lazy",blankImage:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",throttle:99,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll",forceEvent:"",oninit:null,onshow:null,onload:null,onerror:null},r={srcAttr:"data-src",edgeX:0,edgeY:0,visibleOnly:!0},s=a(b),t="lazied",u=[],v=a.data||function(b,c){return a(b).data(c)},w=0,x=0;a.lazyLoadXT=a.extend(q,r,a.lazyLoadXT),a.fn.lazyLoadXT=function(c){c=c||{};var e,g={},h=c.blankImage||q.blankImage,i=c.classNojs||q.classNojs,j=c.checkDuplicates||!0;for(e in r)g[e]=c[e]===d?q[e]:c[e];return this.each(function(){if(this===b)a(q.selector).lazyLoadXT(c);else{if(j&&v(this,t))return;var d=a(this);d.data(t,1).removeClass(i),h&&"IMG"===d[0].tagName&&!d.attr("src")&&d.attr("src",h),d.lazyLoadXT=a.extend({},g),f("init",d),u.unshift(d)}})},a(c).ready(function(){s.on(q.loadEvent,k).on(q.updateEvent,j).on(q.forceEvent,l),q.autoInit&&k()})}(window.jQuery||window.Zepto,window,document); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.picture.js b/dist/jquery.lazyloadxt.picture.js index 294def8..11f9059 100644 --- a/dist/jquery.lazyloadxt.picture.js +++ b/dist/jquery.lazyloadxt.picture.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ diff --git a/dist/jquery.lazyloadxt.picture.min.js b/dist/jquery.lazyloadxt.picture.min.js index 6b06322..30c8989 100644 --- a/dist/jquery.lazyloadxt.picture.min.js +++ b/dist/jquery.lazyloadxt.picture.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ +/* Lazy Load XT 0.8.10 | MIT License */ !function(a,b,c){var d=a.lazyLoadXT,e=b.matchMedia;d.selector+=",picture",a(c).on("lazyinit","img",function(a,b){b.parent("picture").length&&(b.lazyLoadXT.srcAttr="")}).on("lazyinit","picture",function(b,c){if(c[0].firstChild){var d=c.children("img");d.length||(d=a("").appendTo(c)),d.attr("width",c.attr("width")).attr("height",c.attr("height"))}}).on("lazyshow","picture",function(b,c){if(c[0].firstChild){var d=c.lazyLoadXT.srcAttr,f=a.isFunction(d),g=c.children("img"),h=f?d(g):g.attr(d);h&&g.attr("src",h),e&&c.children("br").each(function(){var b=a(this),c=f?d(b):b.attr(d),h=b.attr("media");!c||h&&!e(h).matches||g.attr("src",c)})}})}(window.jQuery||window.Zepto,window,document); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.print.js b/dist/jquery.lazyloadxt.print.js index e8937c1..0ec4b97 100644 --- a/dist/jquery.lazyloadxt.print.js +++ b/dist/jquery.lazyloadxt.print.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ diff --git a/dist/jquery.lazyloadxt.print.min.js b/dist/jquery.lazyloadxt.print.min.js index d3d5f31..7fa6340 100644 --- a/dist/jquery.lazyloadxt.print.min.js +++ b/dist/jquery.lazyloadxt.print.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ +/* Lazy Load XT 0.8.10 | MIT License */ !function(a,b){a.lazyLoadXT.forceEvent+=" beforeprint",b.matchMedia&&b.matchMedia("print").addListener(function(c){c.matches&&a(b).trigger("beforeprint")})}(window.jQuery||window.Zepto,window); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.script.js b/dist/jquery.lazyloadxt.script.js index 3a339f3..8acd18a 100644 --- a/dist/jquery.lazyloadxt.script.js +++ b/dist/jquery.lazyloadxt.script.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ diff --git a/dist/jquery.lazyloadxt.script.min.js b/dist/jquery.lazyloadxt.script.min.js index 3c214d1..f39167c 100644 --- a/dist/jquery.lazyloadxt.script.min.js +++ b/dist/jquery.lazyloadxt.script.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ +/* Lazy Load XT 0.8.10 | MIT License */ !function(a,b,c){var d=a.lazyLoadXT,e=d.dataLazyTag||"data-lazy-tag";b.L=function(a){c.write("
")},a(c).ready(function(){var f=d.srcAttr;a.isFunction(f)&&(f="data-src"),a("br["+e+"],span["+e+"]").each(function(){var b,d=this.attributes,g=c.createElement(a(this).attr(e));for(b=0;b=0;b--){var f=o[b],g=f[0];if(a.contains(c.documentElement,g)){if(!m.visibleOnly||g.offsetWidth>0||g.offsetHeight>0){var h=f.offset(),n=h.top,q=h.left;if(j>n&&n+f.height()>i&&l>q&&q+f.width()>k){var r=f.attr(e);r&&f.attr("src",r),o.splice(b,1)}else p>n&&(p=n)}}else o.splice(b,1)}}}function f(){q>1?(q=1,e(),setTimeout(f,m.throttle)):q=0}function g(a){o.length&&(a&&"scroll"===a.type&&(d(),p>=j)||(q||setTimeout(f,0),q=2))}function h(){a(b).lazyLoadXT()}var i,j,k,l,m={selector:"img",srcAttr:"data-src",classNojs:"lazy",edgeX:0,edgeY:0,throttle:99,visibleOnly:!0,loadEvent:"pageshow",updateEvent:"load orientationchange resize scroll"},n=a(b),o=[],p=0,q=0;a.lazyLoadXT=a.extend(m,a.lazyLoadXT),a.fn.lazyLoadXT=function(){return this.each(function(){if(this===b)return a(m.selector).lazyLoadXT(),void 0;var c=a(this);c.data("lazied")||(c.data("lazied",1).removeClass(m.classNojs),o.unshift(c))}),g(),this},a(c).ready(function(){n.on(m.loadEvent,h).on(m.updateEvent,g),h()})}(window.jQuery||window.Zepto,window,document); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.srcset.js b/dist/jquery.lazyloadxt.srcset.js index f09093f..864b7b3 100644 --- a/dist/jquery.lazyloadxt.srcset.js +++ b/dist/jquery.lazyloadxt.srcset.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ diff --git a/dist/jquery.lazyloadxt.srcset.min.js b/dist/jquery.lazyloadxt.srcset.min.js index 5d4b5f1..0cf46e3 100644 --- a/dist/jquery.lazyloadxt.srcset.min.js +++ b/dist/jquery.lazyloadxt.srcset.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ +/* Lazy Load XT 0.8.10 | MIT License */ !function(a,b,c,d){function e(b,c){return Math[c].apply(null,a.map(b,function(a){return a[h]}))}function f(a){return a[h]>=s[h]||a[h]===i}function g(a){return a[h]===i}var h,i,j=a.lazyLoadXT,k=function(){return"srcset"in new Image}(),l=/^\s*(\S*)/,m=/\S\s+(\d+)w/,n=/\S\s+(\d+)h/,o=/\S\s+([\d\.]+)x/,p=[0,1/0],q=[0,1],r={srcsetAttr:"data-srcset",srcsetExtended:!0,srcsetBaseAttr:"data-srcset-base",srcsetExtAttr:"data-srcset-ext"},s={w:0,h:0,x:0};for(h in r)j[h]===d&&(j[h]=r[h]);a(c).on("lazyshow","img",function(d,r){var t=r.attr(j.srcsetAttr);if(t)if(!j.srcsetExtended&&k)r.attr("srcset",t);else{var u=t.split(",").map(function(a){return{url:l.exec(a)[1],w:parseFloat((m.exec(a)||p)[1]),h:parseFloat((n.exec(a)||p)[1]),x:parseFloat((o.exec(a)||q)[1])}});if(u.length){var v,w,x=c.documentElement;s={w:b.innerWidth||x.clientWidth,h:b.innerHeight||x.clientHeight,x:b.devicePixelRatio||1};for(v in s)h=v,i=e(u,"max"),u=a.grep(u,f);for(v in s)h=v,i=e(u,"min"),u=a.grep(u,g);w=u[0].url,j.srcsetExtended&&(w=(r.attr(j.srcsetBaseAttr)||"")+w+(r.attr(j.srcsetExtAttr)||"")),r.attr("src",w)}}})}(window.jQuery||window.Zepto,window,document); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.video.js b/dist/jquery.lazyloadxt.video.js index 4ff3daa..ddd1bc7 100644 --- a/dist/jquery.lazyloadxt.video.js +++ b/dist/jquery.lazyloadxt.video.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ @@ -10,7 +10,7 @@ options.videoPoster = 'data-poster'; $(document).on('lazyshow', 'video', function (e, $el) { - var srcAttr = $el.srcAttr, + var srcAttr = $el.lazyLoadXT.srcAttr, isFuncSrcAttr = $.isFunction(srcAttr); $el diff --git a/dist/jquery.lazyloadxt.video.min.js b/dist/jquery.lazyloadxt.video.min.js index 11f4f56..1fd8dd6 100644 --- a/dist/jquery.lazyloadxt.video.min.js +++ b/dist/jquery.lazyloadxt.video.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ -!function(a){var b=a.lazyLoadXT;b.selector+=",video,iframe[data-src]",b.videoPoster="data-poster",a(document).on("lazyshow","video",function(c,d){var e=d.srcAttr,f=a.isFunction(e);d.attr("poster",d.attr(b.videoPoster)).children("source,track").each(function(){var b=a(this);b.attr("src",f?e(b):b.attr(e))}),this.load()})}(window.jQuery||window.Zepto); \ No newline at end of file +/* Lazy Load XT 0.8.10 | MIT License */ +!function(a){var b=a.lazyLoadXT;b.selector+=",video,iframe[data-src]",b.videoPoster="data-poster",a(document).on("lazyshow","video",function(c,d){var e=d.lazyLoadXT.srcAttr,f=a.isFunction(e);d.attr("poster",d.attr(b.videoPoster)).children("source,track").each(function(){var b=a(this);b.attr("src",f?e(b):b.attr(e))}),this.load()})}(window.jQuery||window.Zepto); \ No newline at end of file diff --git a/dist/jquery.lazyloadxt.widget.js b/dist/jquery.lazyloadxt.widget.js index 9d3a9ee..f9f394d 100644 --- a/dist/jquery.lazyloadxt.widget.js +++ b/dist/jquery.lazyloadxt.widget.js @@ -1,4 +1,4 @@ -/*! Lazy Load XT v0.8.9 2014-01-06 +/*! Lazy Load XT v0.8.10 2014-01-07 * http://ressio.github.io/lazy-load-xt * (C) 2014 RESS.io * Licensed under MIT */ diff --git a/dist/jquery.lazyloadxt.widget.min.js b/dist/jquery.lazyloadxt.widget.min.js index 500898a..c8b3d78 100644 --- a/dist/jquery.lazyloadxt.widget.min.js +++ b/dist/jquery.lazyloadxt.widget.min.js @@ -1,2 +1,2 @@ -/* Lazy Load XT 0.8.9 | MIT License */ +/* Lazy Load XT 0.8.10 | MIT License */ !function(a){var b=a.lazyLoadXT,c=b.widgetAttr||"data-lazy-widget",d=//;b.selector+=",["+c+"]",a(document).on("lazyshow","["+c+"]",function(){var b,e=a(this),f=e.attr(c);f&&(e=a("#"+f)),e.length&&(b=d.exec(e.html()),b&&e.replaceWith(a.trim(b[1])))})}(window.jQuery||window.Zepto); \ No newline at end of file diff --git a/lazyloadxt.jquery.json b/lazyloadxt.jquery.json index c802409..53554a1 100644 --- a/lazyloadxt.jquery.json +++ b/lazyloadxt.jquery.json @@ -1,6 +1,6 @@ { "name": "lazyloadxt", - "version": "0.8.9", + "version": "0.8.10", "title": "Lazy Load XT for jQuery", "description": "Lazy Load XT is mobile-oriented, fast and extensible jQuery plugin for lazy loading of images, videos and other media with built-in support of jQueryMobile framework. It improves performance of website by loading visible media elements only, and elements below the fold are loaded after page scroll. The plugin has many options, supports callbacks and special lazy events, that allows to have different loading effects (e.g. fade in and spinner effects). Examples of plugin and its addons include ajax, background images, infinite scroll, horizontal scroll, iframe-based widgets (YouTube, Vimeo, Google Maps Engine Lite, Facebook recommend button, Google+ profile), html5 video, responsive images with retina support (srcset and picture polyfills), social widgets (embedded tweet, Twitter share button, Google Plus badge and share button, Facebook like and recommend buttons, Facebook post comments), load all images before print, etc. Tested in IE 6-11, Chrome 1-31, Firefox 1.5-27.0, Safari 3-7, Opera 10.6-18.0, iOS 5-7, Android 2.3-4.4, and WP8. Requires jQuery 1.7+ or Zepto 1.0+.", "homepage": "http://ressio.github.io/lazy-load-xt", diff --git a/package.json b/package.json index 26e1232..0e9bdf0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "lazyloadxt", "title": "Lazy Load XT", - "version": "0.8.9", + "version": "0.8.10", "description": "Lazy Load XT is mobile-oriented, fast and extensible jQuery plugin for lazy loading of images, videos and other media with built-in support of jQueryMobile framework. It improves performance of website by loading visible media elements only, and elements below the fold are loaded after page scroll. The plugin has many options, supports callbacks and special lazy events, that allows to have different loading effects (e.g. fade in and spinner effects). Examples of plugin and its addons include ajax, background images, infinite scroll, horizontal scroll, iframe-based widgets (YouTube, Vimeo, Google Maps Engine Lite, Facebook recommend button, Google+ profile), html5 video, responsive images with retina support (srcset and picture polyfills), social widgets (embedded tweet, Twitter share button, Google Plus badge and share button, Facebook like and recommend buttons, Facebook post comments), load all images before print, etc. Tested in IE 6-11, Chrome 1-31, Firefox 1.5-27.0, Safari 3-7, Opera 10.6-18.0, iOS 5-7, Android 2.3-4.4, and WP8. Requires jQuery 1.7+ or Zepto 1.0+.", "homepage": "http://ressio.github.io/lazy-load-xt", "author": {