1jQuery(function($) { 2 $(document).ready(function () { 3 setResponsiveBackground(); 4 }); 5 $(window).on('resize', function () { 6 setResponsiveBackground(); 7 }); 8 function setResponsiveBackground(){ 9 $("[data-srcset]").each(function( index ) { 10 if ($(this).data("srcset")){ 11 var tImages = $(this).data("srcset").split(","); 12 var max=parseInt(tImages.length-1); 13 for (i=max; i > -1; i--) { 14 var tSplit = tImages[i].split(" "); 15 if ($(window).width() >= tSplit[1]) { 16 17 if (tSplit[0].trim() != "") { 18 /*var images = new Array(); 19 images[i] = new Image(); 20 images[i].src = tSplit[0];*/ 21 22 if ($(this).attr("data-srccurrent") != tSplit[0]) { 23 $(this).addClass('lazyload'); 24 $(this).attr('data-bg', tSplit[0]); 25 //$(this).css('background-image', "url('" + tSplit[0] + "')"); 26 $(this).attr("data-srccurrent", tSplit[0]); 27 } 28 } 29 break; 30 } 31 } 32 } 33 }); 34 } 35});
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.