1/* eslint-disable semi, no-var */ 2Flatsome.behavior('wp-rocket-lazy-load-packery', { 3 attach: function (context) { 4 var $lazyLoad = jQuery('.has-packery .lazy-load', context) 5 6 if (!$lazyLoad.length) return 7 8 var observer = new IntersectionObserver(function (entries) { 9 entries.forEach(function (entry) { 10 if (entry.intersectionRatio > 0) { 11 observer.unobserve(entry.target) 12 jQuery(entry.target).imagesLoaded(function () { 13 jQuery('.has-packery').packery('layout') 14 }) 15 } 16 }) 17 }, { 18 rootMargin: '0px', 19 threshold: 0.1 20 }) 21 22 $lazyLoad.each(function (i, el) { 23 observer.observe(el) 24 }) 25 } 26});
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.