-
Notifications
You must be signed in to change notification settings - Fork 0
lazyLoad
Mike Byrne edited this page Jan 25, 2022
·
5 revisions
A A17-helperised version of: https://github.com/area17/lazyload (v2.1.1 / 2018-04-01)
- nothing
optional settings object:
- pageUpdatedEventName - event to listen for page updated events to retrigger
- elements - string of elements to search for to lazy load in
- rootMargin - IntersectionObserver option
- threshold - IntersectionObserver option
- maxFrameCount - frequency of operation
See https://github.com/area17/lazyload
- nothing
lazyLoad();
Or, with options:
lazyLoad({
pageUpdatedEventName: 'spfdone',
elements: 'img[data-src]',
rootMargin: '0px 0px 30% 0px',
threshold: 0.1,
maxFrameCount: 2,
});