I wish to implement infinite scrolling with javascript and without jquery.
I am new to javascript.
After searching all over the net, I have this code.
What about replacing this line of code:
if (getDocHeight() == getScrollXY()[1] + window.innerHeight)
with the following:
if (getDocHeight() - 20 <= getScrollXY()[1] + window.innerHeight)
Where 20 is the number how much pxs from bottom you want the trigger to execute.
20
px
Fiddle