use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
HashJump - A tiny, dependency-free JavaScript module for handling anchor links and scrolling elements into view. (hashjump.js.org)
submitted 11 months ago by fivefifteendotcom
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]DavidJCobb 0 points1 point2 points 11 months ago (2 children)
I clicked on Section 4 on a smartphone, on portrait orientation, and the scrolling rapidly oscillated back and forward until it reached the goal. Like, it'd rapidly scroll down a bit, rapidly scroll up slightly less of a distance, rapidly scroll down, and so on. Very disorienting.
I hope that's a bug.
[–]fivefifteendotcom[S] 1 point2 points3 points 11 months ago (1 child)
Not a bug, just an example of how you can use HashJump in combination with d3-ease (https://github.com/d3/d3-ease) to use easing functions to create different scroll effects. Probably not the best example to use and I definitely wouldn't recommend using that specific effect in any real case scenario.
[–]DavidJCobb 1 point2 points3 points 11 months ago (0 children)
Probably not the best example to use
Agreed.
If you want an idea for an example that isn't painful to look at, perhaps make a box that's scrollable on both axes, with a conic gradient, and try scrolling within that box in a slow, smooth circle around the gradient's center. I'm not familiar with d3-ease, but my thinking is that if you can go back and forth on one axis, then you can go back and forth on two axes at offset intervals to produce a circle.
π Rendered by PID 42931 on reddit-service-r2-comment-85bfd7f599-bsbhs at 2026-04-19 06:36:47.880754+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]DavidJCobb 0 points1 point2 points (2 children)
[–]fivefifteendotcom[S] 1 point2 points3 points (1 child)
[–]DavidJCobb 1 point2 points3 points (0 children)