Timeline for How to scroll an HTML page to a given anchor
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 28, 2021 at 21:22 | history | edited | Peter Mortensen | CC BY-SA 4.0 |
Active reading [<https://en.wikipedia.org/wiki/JavaScript> <https://en.wikipedia.org/wiki/JQuery> <https://en.wikipedia.org/wiki/IOS>]. Expanded.
|
Feb 18, 2020 at 4:19 | comment | added | Debbie Kurth | Works in IOS just tested it. | |
Jan 6, 2020 at 21:57 | comment | added | TadLewis | I had to remove the multiplication by .2; it then went directly to my element. This works great if you are placing your data via document writes and you need to navigate after the page has completed loading. Straight hash navigation from the URL doesn't work in that case. Stick it in an event listener for page load. | |
Jan 27, 2018 at 12:34 | comment | added | R01010010 | Thank you I love pure javascript solutions | |
Dec 2, 2017 at 3:01 | comment | added | Mark Barrasso | This should be the accepted answer: it is a pure js example AND it achieves the desired scrolling animation effect. I adjusted the timeout value to 20 and it works flawlessly. | |
Feb 11, 2017 at 22:05 | comment | added | Dave Everitt | Very refreshing to see a pure js version. I teach students to always look under the hood and understand what JQuery does for them, so this is a nice example. | |
Aug 4, 2016 at 9:39 | comment | added | AntBirch | Apologies for commenting on an old topic but this works best for me as my project isn't using JQuery. Only issue I noticed is that it misses off 5 pixels or so if you scroll to the very top. | |
May 4, 2016 at 11:56 | review | Suggested edits | |||
May 4, 2016 at 13:13 | |||||
Apr 29, 2016 at 4:28 | review | Late answers | |||
Apr 29, 2016 at 4:30 | |||||
Apr 29, 2016 at 4:09 | history | answered | Michael Whinfrey | CC BY-SA 3.0 |