Why programming such a silly function ?
Questions:
- Do you really believe that your users will like the mentioned function you describe?
-Do you really believe the users have the time and the durability to click everytime onto a button to load new (further) items?
I will tell you → the most don’t want to make manual actions on your site, they want just to enjoy your site, where everything is working magically in an automatic way.
So what exactly does it mean for you as coder?
-Brainstorming and understanding of what i am trying to offer you.
-After understanding that there are much better ways to generate your wished functionality, youw ill need some generated code → which will do the described function.
What you will need to be successful ?
-you will need an onScroll() identifier, which will tell you when you arrived a certain part of your page, while scrolling down your page.
-once the setted-scroll-checkpoint is arrived → a → loadNewItems()-function will start to expand the showing data inside of your repeater (i hope you are using a repeater).
But before i provide you a code, maybe you want to try to resolve this issue by your own, loking onto all the already given examples and solution (solved years ago).
- A button for load more from Dataset on Repeater with Filter
- How to make Load More button with code, to load more of the filtered data in the repeater
- Load More button for repeater loads but does not perform the replacements data in code onReady
- Load More Button for results page
- Load more like page extender on same page
- How to limit load more button to display only 40 items of repeater on a one page
- Load More Button Help
- Controlling repeater load
I am alsmost sure that one of the provided links will help you out, even without having take a look on them.
So try to generate your AUTOMATIC-INFINITE-SCROLLING-FUNCTION, without having the ANNOYING click onto a button all the time.