Changeset 1143058
- Timestamp:
- 04/23/2015 09:29:33 AM (11 years ago)
- Location:
- smart-image-loader/trunk
- Files:
-
- 2 edited
-
smart_image_loader.js (modified) (2 diffs)
-
smart_image_loader.min.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smart-image-loader/trunk/smart_image_loader.js
r1033181 r1143058 221 221 width: $this.width(), 222 222 height: $this.height(), 223 visibility: getStyle(this, ' visibility') != "hidden" && getStyle(this, 'opacity') != "0" && $this.is(":visible")223 visibility: getStyle(this, 'display') != "none" && getStyle(this, 'visibility') != "hidden" && getStyle(this, 'opacity') != "0" && $this.is(":visible") 224 224 }); 225 225 … … 424 424 } 425 425 426 e.target.removeAttribute("data-sil"); 426 427 427 428 $images_to_load = $wrapped_images.filter( is_visible ); -
smart-image-loader/trunk/smart_image_loader.min.js
r1033181 r1143058 6 6 w=ax.data("height");d=ax.data("visibility");at=aq+w>P-ak.meat;av=ao+ar>p-ak.meat;ap=aq<P+U+ak.meat;ay=ao<p+G+ak.meat;return at&&av&&ap&&ay&&d;},ab=function(d){var w,an; 7 7 if(d.nodeType&&d.nodeType==1){w=d;}else{if(this.nodeType&&this.nodeType==1){w=this;}}an=Q(w).attr("src");return an==ak.placeholder||an==i;},S=function(d){return typeof d.width=="string"&&d.width.match(/^\d+$/)&&typeof d.height=="string"&&d.height.match(/^\d+$/); 8 },e=function(d){d=d||C||Q("body").find("noscript").prev(ak.selector);d.each(function(){var w=Q(this);w.data({offsetTop:w.offset().top,offsetLeft:w.offset().left,width:w.width(),height:w.height(),visibility:Z(this," visibility")!="hidden"&&Z(this,"opacity")!="0"&&w.is(":visible")});8 },e=function(d){d=d||C||Q("body").find("noscript").prev(ak.selector);d.each(function(){var w=Q(this);w.data({offsetTop:w.offset().top,offsetLeft:w.offset().left,width:w.width(),height:w.height(),visibility:Z(this,"display")!="none"&&Z(this,"visibility")!="hidden"&&Z(this,"opacity")!="0"&&w.is(":visible")}); 9 9 });h=Q(aj).height();},H=function(){var d,w,an;Y.scrollBy(0,Math.floor(f/2));f*=0.95;d=h<=U+P+1;w=(P===0);an=d||w;J=false;if(Math.abs(f)>2&&!s&&!an){J=true; 10 10 }else{if(an&&ak.emulate_rubberband){b(f);}}},b=function(an){n=an;var ao=an<0?1:-1,w=Math.min(Math.abs(an),Y.innerHeight/10)*ao,d=Math.abs(an*3);d=Math.min(d,200); … … 16 16 });}ae.attr("src",ap.attr("title"));N=N.add(ae);requestAnimationFrame(function(){if(!S(ao)){e(C);T();}});if(ak.cleanup){ap.parent("span").remove();}},T=function(d){var w=C.filter(V); 17 17 if(w.length>0){w.each(function(an,ao){C=C.map(function(){if(this!==ao){return this;}});W(ao,M,d);});}},y=function(){C.each(function(){var d=this;W(d,M); 18 C=C.map(function(){if(this!==d){return this;}});});},M=function(w){var d,an;I.trigger("sil_load",w.target);if(!S(w.target)){e(C);T();} d=C.filter(V);an=C.not(d);19 N=N.map(function(){if(this!==w.target){return this;}});if(d.length+N.length===0){if(an.length===0){o();}else{R();}}},R=function(){I.trigger("sil_load_visible");18 C=C.map(function(){if(this!==d){return this;}});});},M=function(w){var d,an;I.trigger("sil_load",w.target);if(!S(w.target)){e(C);T();}w.target.removeAttribute("data-sil"); 19 d=C.filter(V);an=C.not(d);N=N.map(function(){if(this!==w.target){return this;}});if(d.length+N.length===0){if(an.length===0){o();}else{R();}}},R=function(){I.trigger("sil_load_visible"); 20 20 if(C.length===0){o();}else{if(!z){y();}}},o=function(){I.trigger("sil_load_all");},ai=window.sil_refresh=function(){if(v===true){e(C);T();}},D=function(d){d.preventDefault(); 21 21 F=d;},A=function(){j=0;f=0;l=false;k=false;s=true;J=false;},am=function(){l=false;k=false;s=false;if(ak.emulate_inertia){J=true;}},X=function(d){ad=d;},u=function(d){al=d;
Note: See TracChangeset
for help on using the changeset viewer.