I am trying to make a list of <li>
's so that when I click on one, it goes up to the top of the page, no matter if it is the last one or if there's just two on the list. I call scrollToElement() but it bounces back because of the lack of padding after the element. I have tried appending a <li>
element of height 2000px, but the list will bounce back, making the last element go back to the bottom.
Asked
Active
Viewed 461 times
-1

manutenfruits
- 1,447
- 3
- 17
- 25
1 Answers
0
I found the solution, I needed to call .refresh() after appending the padding <li>
. Afterwards, it will scroll past the bottom like expected.

manutenfruits
- 1,447
- 3
- 17
- 25