here I use 2 examples of buttons A and B, then button A to display data using infiniteScroll.
I run button B when infinite Scroll to button A is not finished. Then I pressed the A button again and what happened was that the data displayed was not correct.
Please help, because I have tried several conditions but it still doesn’t work.
I want to perform Infinite Scroll repeatedly without waiting infinite scroll to finish and the data shown is always correct
Infinite scroll load the data when the page scroll is near to the bottom. How you display the data?
This example (https://framework7.io/docs/infinite-scroll.html) works because we are waiting for the data to finish when we use infinite scroll.
Please now try to make 2 button A and button B.
Button A: to display data using infinite scroll function
Button B: cancel infinite scrolling when data has not been finished displayed by button A
The last step press the A button again, you will know that the data is displayed incorrectly.
here I am tired of creating conditions because the various ways to fix it don’t work properly
oh yes, I understand now.
Thank you so much for your help.
Cool. What is your issue before? I’m curious
previously, I don’t use this function
- $$(’.list ul’).children().remove();
Yup. You can clears an existing timer with
clearTimeout() by passing in the numeric value returned by