Create a Lazy Loader in Wix
- Apr 6, 2022
- 1 min read
Sometimes you have a lot of content in a database that you would like to display on a page. However, loading all of that content at once can hurt the overall load speed of the page and website. What you can do to prevent that is to use a simple function that will load additional content when the user scrolls down the website.

export function loadingStrip_viewportEnter(event) { $w("#loadMore").show(); $w("#dataset1").loadMore() .then(() => { $w("#loadMore").hide(); }); }
Make sure you change "loadingStrip" to the name of the strip under the repeater and the strip that has the loader. Also, change the name your loader to "loadMore".
Now you should have successfully set up the lazy loader on your website. Have fun!




Comments