尊龙凯时 - 人生就是搏!-z6com
(function(w, d){
var b = d.getElementsByTagName("body")[0];
var s = d.createElement("script"); s.async = true;
var v = !("IntersectionObserver" in w) ? "8.7.1" : "10.5.2";
s.src = "/wp-content/plugins/wp-rocket/inc/front/js/lazyload-" + v + ".min.js";
w.lazyLoadOptions = {
elements_selector: "img, iframe",
data_src: "lazy-src",
data_srcset: "lazy-srcset",
skip_invisible: false,
class_loading: "lazyloading",
class_loaded: "lazyloaded",
threshold: 300,
callback_load: function(element) {
if ( element.tagName === "IFRAME" && element.dataset.rocketLazyload == "fitvidscompatible" ) {
if (element.classList.contains("lazyloaded") ) {
if (typeof window.jQuery != "undefined") {
if (jQuery.fn.fitVids) {
jQuery(element).parent().fitVids();
}
}
}
}
}
}; // Your options here. See "recipes" for more information about async.
b.appendChild(s);
}(window, document));
// Listen to the Initialized event
window.addEventListener('LazyLoad::Initialized', function (e) {
// Get the instance and puts it in the lazyLoadInstance variable
var lazyLoadInstance = e.detail.instance;
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
lazyLoadInstance.update();
} );
} );
var b = document.getElementsByTagName("body")[0];
var config = { childList: true, subtree: true };
observer.observe(b, config);
}, false); 尊龙凯时 - 人生就是搏!-z6com