PluginProbe
Elementor Website Builder – more than just a page builder / 3.10.0-dev1
Elementor Website Builder – more than just a page builder v3.10.0-dev1
4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 All 452 releases
elementor / assets / js / lazyload.js

lazyload.js in Elementor Website Builder – more than just a page builder 3.10.0-dev1, at assets/js/lazyload.js

34 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.8.0 - 08-11-2022 */
2 /******/ (() => { // webpackBootstrap
3 /******/ "use strict";
4 var __webpack_exports__ = {};
5 /*!*************************************************!*\
6 !*** ../modules/lazyload/assets/js/frontend.js ***!
7 \*************************************************/
8
9
10 document.addEventListener('DOMContentLoaded', function () {
11 var dataAttribute = 'data-e-bg-lazyload';
12 var lazyloadBackgrounds = document.querySelectorAll("[".concat(dataAttribute, "]:not(.lazyloaded)"));
13 var lazyloadBackgroundObserver = new IntersectionObserver(function (entries) {
14 entries.forEach(function (entry) {
15 if (entry.isIntersecting) {
16 var _ref = [entry.target, entry.target],
17 lazyloadBackground = _ref[0],
18 element = _ref[1];
19 var lazyloadSelector = lazyloadBackground.getAttribute(dataAttribute);
20 if (lazyloadSelector) {
21 lazyloadBackground = lazyloadSelector;
22 }
23 lazyloadBackground.classList.add('lazyloaded');
24 lazyloadBackgroundObserver.unobserve(element);
25 }
26 });
27 });
28 lazyloadBackgrounds.forEach(function (lazyloadBackground) {
29 lazyloadBackgroundObserver.observe(lazyloadBackground);
30 });
31 });
32 /******/ })()
33 ;
34 //# sourceMappingURL=lazyload.js.map