Skip to main content

Lazy Loading Service

The Lazy Loading Service provides subscription capabilities related to Lazy Loading Slides.

Methods

onSlideLazyLoad(callback)

Description

  • Subscribes to slideLazyLoad event. The callback is invoked when slides are lazy loaded.

Return Value: null

Options:

  • callback: Function Invoked 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 slideLazyLoad event.

Return Value: null

Options:

  • callback: Function this callback is the reference to the subscription and is used to unsubscribe.

Code Example

    digideckCore.lazyLoadingService.offSlideLazyLoad(callback);