The Woodspeen


The Woodspeen

The Woodspeen — Woodspeen

This website uses cookies to ensure you get the best experience. ]]>

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as “Necessary” are stored on your browser as they are essential for enabling the basic functionalities of the site.

We also use third-party cookies that help us analyze how you use this website, store your preferences, and provide the content and advertisements that are relevant to you. These cookies will only be stored in your browser with your prior consent.

You can choose to enable or disable some or all of these cookies but disabling some of them may affect your browsing experience.

{ const dataAttribute = ‘data-e-bg-lazyload’; const lazyloadBackgrounds = document.querySelectorAll( `[${ dataAttribute }]:not(.lazyloaded)` ); const lazyloadBackgroundObserver = new IntersectionObserver( ( entries ) => { entries.forEach( ( entry ) => { if ( entry.isIntersecting ) { let lazyloadBackground = entry.target; const lazyloadSelector = lazyloadBackground.getAttribute( dataAttribute ); if ( lazyloadSelector ) { lazyloadBackground = entry.target.querySelector( lazyloadSelector ); } if( lazyloadBackground ) { lazyloadBackground.classList.add( ‘lazyloaded’ ); } lazyloadBackgroundObserver.unobserve( entry.target ); } }); }, { rootMargin: ‘100px 0px 100px 0px’ } ); lazyloadBackgrounds.forEach( ( lazyloadBackground ) => { lazyloadBackgroundObserver.observe( lazyloadBackground ); } ); }; const events = [ ‘DOMContentLoaded’, ‘elementor/lazyload/observe’, ]; events.forEach( ( event ) => { document.addEventListener( event, lazyloadRunObserver ); } ); ]]>

Source

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *