1/* 2 * Krio Image Loader Jquery Plugin v1 3 * http://krio.me/jquery-image-loader-plugin 4 * http://github.com/jquery-image-loader-plugin 5*/ 6(function($) { 7 $.fn.krioImageLoader = function(options) { 8 var opts = $.extend({}, $.fn.krioImageLoader.defaults, options); 9 $(this).css({opacity: 0}) 10 opts.onStart.call(this); 11 var imagesToLoad = $(this).find("img") 12 .css({opacity: 0, visibility: "hidden"}) 13 .addClass("krioImageLoader"); 14 var imagesToLoadCount = imagesToLoad.size(); 15 var checkIfLoadedTimer = setInterval(function() { 16 if(!imagesToLoadCount) { 17 clearInterval(checkIfLoadedTimer); 18 return; 19 } else { 20 imagesToLoad.filter(".krioImageLoader").each(function() { 21 if(this.complete) { 22 fadeImageIn(this); 23 imagesToLoadCount--; 24 } 25 }); 26 } 27 }, opts.loadedCheckEvery); 28 var fadeImageIn = function(imageToLoad) { 29 $(imageToLoad).css({visibility: "visible"}) 30 .animate({opacity: 1}, 31 opts.imageEnterDelay, 32 removeKrioImageClass(imageToLoad)); 33 }; 34 var removeKrioImageClass = function(imageToRemoveClass) { 35 $(imageToRemoveClass).removeClass("krioImageLoader"); 36 }; 37 $(this).css({opacity: 1}) 38 }; 39 $.fn.krioImageLoader.defaults = { 40 onStart: function(){}, 41 loadedCheckEvery: 350, 42 imageEnterDelay: 500 43 }; 44})(jQuery);
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.