1(function($) { 2 $.fn.extend({ 3 smartpreload: function(options) { 4 var settings = $.extend({ 5 images: null, 6 oneachimageload: null, 7 onloadall: null 8 }, options); 9 return this.each(function() { 10 var loadcounter = 0; 11 for (var i = 0; i < settings.images.length; i++) { 12 var img = $('<img/>').addClass('preloading').css('display', 'none').attr('src', settings.images[i]).load(function() { 13 loadcounter++; 14 if (settings.oneachimageload != null) settings.oneachimageload($(this).attr('src')); 15 if (loadcounter == settings.images.length) { 16 if (settings.onloadall != null) settings.onloadall(); 17 } 18 }); 19 } 20 }); 21 } 22 }); 23})(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.