Answer the question
In order to leave comments, you need to log in
How to set a condition?
Hello. I'm doing an infinite scroll (ajax scroll) on vue. I made a request to the server, but I can’t set a condition for this script to work when the user scrolls 1000px from the bottom of the page ... Help, how to make this condition?
Answer the question
In order to leave comments, you need to log in
1000 pixels is almost the full height of any screens, i.e. When the site loads, the content loading will be triggered almost immediately. (If you take the main ones, these are all sorts of 1368x768 and 1920x1080, i.e. 1000 is nothing at all). Not to mention mobile, etc.
You need to track at least a few hundred pixels to the end of the page.
https://stackoverflow.com/a/12900813
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question