Lazy Loading Service
The Lazy Loading Service provides subscription capabilities related to Lazy Loading Slides.
Methods
onSlideLazyLoad(callback)
Description
- Subscribes to
slideLazyLoadevent. The callback is invoked when slides are lazy loaded.
Return Value: null
Options:
callback: FunctionInvoked getting passed the lazy loaded slide data.
Code Example
event - Object: jQuery event object jQuery Event Object
slideId - String: The slideId of the lazy loaded slide.
slideData - Object: jQuery Element of the lazy loaded slide.
digideckCore.lazyLoadingService.onSlideLazyLoad((event, slideId, slideData) => {
// ** Do Stuff **
});
offSlideLazyLoad(callback)
Description
- Unsubscribes from
slideLazyLoadevent.
Return Value: null
Options:
callback: Functionthis callback is the reference to the subscription and is used to unsubscribe.
Code Example
digideckCore.lazyLoadingService.offSlideLazyLoad(callback);