Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Lazy Load For Dynamic Content Rate Topic   - - - - -

 
  • alaa
  • Senior Member
  • Members
  • Join Date: 18-Mar 18
  • 150 posts

Posted 19 February 2019 - 06:13 AM #1

Hello, 

 

I am using Lozad to lazyload images on my CS-Cart Store. Lozad is a lightweight solution that utilizes modern Intersection Observer API

 

I was able to make it work except for dynamically loaded images content (AJAX sorting, products list view change ...etc). 

 

Any ideas please on how I can make it work with native CS-Cart AJAX products loading? 

 

The developer of Lozad confirms that it should work with the dynamically added images:

 

 

If you want to lazy load dynamically added elements:

const observer = lozad();
observer.observe();

// ... code to dynamically add elements
observer.observe(); // observes newly added elements as well