PageSourceSearch

https://cbe.org.za/Webmodules/common/js/lazyload.min.js

js cbe.org.za collected 2026-10-06 02:07:21 UTC 4,619 bytes, 15 lines download raw bytes

1/*!
2 * Lazy Load - jQuery plugin for lazy loading images
3 *
4 * Copyright (c) 2007-2015 Mika Tuupola
5 *
6 * Licensed under the MIT license:
7 *   http://www.opensource.org/licenses/mit-license.php
8 *
9 * Project home:
10 *   http://www.appelsiini.net/projects/lazyload
11 *
12 * Version:  1.9.7
13 *
14 */
15"undefined"==typeof lazyloadimgpath&&(lazyloadimgpath="/_webmoduledata/images/thumb/"),function(e,t,o,n){var i=e(t);e.fn.lazyload=function(r){var a,f=this,l={threshold:0,failure_limit:0,event:"scroll",effect:"show",container:t,data_attribute:"original",skip_invisible:!1,appear:null,load:null,placeholder:""};function d(){var t=0;f.each((function(){var o=e(this);if(!l.skip_invisible||o.is(":visible"))if(e.abovethetop(this,l)||e.leftofbegin(this,l));else if(e.belowthefold(this,l)||e.rightoffold(this,l)){if(++t>l.failure_limit)return!1}else o.trigger("appear"),t=0}))}return r&&(n!==r.failurelimit&&(r.failure_limit=r.failurelimit,delete r.failurelimit),n!==r.effectspeed&&(r.effect_speed=r.effectspeed,delete r.effectspeed),e.extend(l,r)),a=l.container===n||l.container===t?i:e(l.container),0===l.event.indexOf("scroll")&&a.bind(l.event,(function(){return d()})),this.each((function(){var o=this,i=e(o),r=this;o.loaded=!1,i.attr("src")!==n&&!1!==i.attr("src")||(i.is("img")&&i.attr("src",l.placeholder),i.is("video")&&i.attr("src",l.placeholder)),i.one("appear",(function(){if(!this.loaded){if(l.appear){var a=f.length;l.appear.call(o,a,l)}attrn=i.attr("data-"+l.data_attribute),attrn!=n?(e("<img />").bind("load",(function(){var t=i.attr("data-"+l.data_attribute);t=t.indexOf("/")>-1?t:lazyloadimgpath+t,i.hide(),i.is("img")?i.attr("src",t):i.css("background-image","url('"+t+"')"),i[l.effect](l.effect_speed),o.loaded=!0;var n=e.grep(f,(function(e){return!e.loaded}));if(f=e(n),l.load){var a=f.length;l.load.call(o,a,l,r)}})).on("error",(function(){i.is("img")?i.attr("src","/Webmodules/Images/NoImage.png"):i.css("background-image","url('/Webmodules/Images/NoImage.png')")})).attr("src",attrn.indexOf("/")>-1?attrn:lazyloadimgpath+attrn),i.is("video")&&e("<video />:not[.lazyloaded]").each((function(){var n=i.attr("data-"+l.data_attribute);i.hide(),t.navigator.userAgent.indexOf("MSIE ")>0||navigator.userAgent.match(/Trident.*rv\:11\./)?i.attr("src",n):(i.append("<source src='"+n+"' type='video/mp4'>"),i.removeAttr("src")),i.toggle(l.effect_speed),o.loaded=!0,o.play(),"undefined"!=typeof temp&&(f=e(temp)),i.addClass("lazyloaded")}))):i.addClass("lazyloaded")}})),0!==l.event.indexOf("scroll")&&i.bind(l.event,(function(){o.loaded||i.trigger("appear")}))})),i.bind("resize",(function(){d()})),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&i.bind("pageshow",(function(t){t.originalEvent&&t.originalEvent.persisted&&f.each((function(){e(this).trigger("appear")}))})),e(o).ready((function(){d()})),this},e.belowthefold=function(o,r){var a;return r.container===n||r.container===t?a=(t.innerHeight?t.innerHeight:i.height())+i.scrollTop():r.container!==n&&void 0===r.container.offset&&"function"==typeof r.container.offset&&(a=e(r.container).offset().top+e(r.container).height()),a<=e(o).offset().top-r.threshold},e.rightoffold=function(o,r){var a;return r.container===n||r.container===t?a=i.width()+i.scrollLeft():r.container!==n&&void 0===r.container.offset&&"function"==typeof r.container.offset&&(a=e(r.container).offset().left+e(r.container).width()),a<=e(o).offset().left-r.threshold},e.abovethetop=function(o,r){var a;return r.container===n||r.container===t?a=i.scrollTop():r.container!==n&&void 0===r.container.offset&&"function"==typeof r.container.offset&&(a=e(r.container).offset().top),a>=e(o).offset().top+r.threshold+e(o).height()},e.leftofbegin=function(o,r){var a;return r.container===n||r.container===t?a=i.scrollLeft():r.container!==n&&void 0===r.container.offset&&"function"==typeof r.container.offset&&(a=e(r.container).offset().left),a>=e(o).offset().left+r.threshold+e(o).width()},e.inviewport=function(t,o){return!(e.rightoffold(t,o)||e.leftofbegin(t,o)||e.belowthefold(t,o)||e.abovethetop(t,o))},e.extend(e.expr[":"],{"below-the-fold":function(t){return e.belowthefold(t,{threshold:0})},"above-the-top":function(t){return!e.belowthefold(t,{threshold:0})},"right-of-screen":function(t){return e.rightoffold(t,{threshold:0})},"left-of-screen":function(t){return!e.rightoffold(t,{threshold:0})},"in-viewport":function(t){return e.inviewport(t,{threshold:0})},"above-the-fold":function(t){return!e.belowthefold(t,{threshold:0})},"right-of-fold":function(t){return e.rightoffold(t,{threshold:0})},"left-of-fold":function(t){return!e.rightoffold(t,{threshold:0})}})}(jQuery,window,document);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.