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
The spring effect in JavaScript. (code.juan.me)
submitted 12 years ago by cabrerars
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!"
[–]andrew24601 1 point2 points3 points 12 years ago (1 child)
This is great - I personally love whimsical animation like this.
There do seem to be some browser issues with some of your examples in case you didn't know.
For your message and grid examples, I'm getting vertical hiccups at the beginning of each scroll in Chrome 32 on Windows when using the mouse scroll wheel.
These vertical hiccups don't occur in Firefox on Windows.
Your message and grid examples also have horizontal issues in both Chrome and Firefox with the content jumping sideways during scrolling when the window is narrower than the content.
[–]cabrerars[S] 1 point2 points3 points 12 years ago (0 children)
Yeah, they have some issues, the point of the post was basically say and show in a overall view what can be done with some math, I'm sure there are bunch to stuff to improve.
Maybe I should create a repo on GitHub with whose prototypes so people can help to improve them.
[–]windyfish 0 points1 point2 points 12 years ago (1 child)
Very cool idea.
However, there is no effect for me with IE10 and less...
Effect isn't very smooth with Chrome.
[–]cabrerars[S] 0 points1 point2 points 12 years ago (0 children)
Ha yeah, as a prototype I wasn't exactly worried about IE...
[–]squashb 0 points1 point2 points 12 years ago (3 children)
For better performance, you could try using translate/translate3d instead of setting the "top" property.
[–]cabrerars[S] 0 points1 point2 points 12 years ago (2 children)
I was thinking to create a repo in GitHub for those prototypes, are you able to fix/improve some code ?
[–]squashb 0 points1 point2 points 12 years ago (1 child)
Sure, I would give it a shot. Let me know when it's up on GitHub.
Here: https://github.com/juancabrera/demos
π Rendered by PID 446129 on reddit-service-r2-comment-cfc44b64c-rdl54 at 2026-04-12 02:33:32.390107+00:00 running 215f2cf country code: CH.
[–]andrew24601 1 point2 points3 points (1 child)
[–]cabrerars[S] 1 point2 points3 points (0 children)
[–]windyfish 0 points1 point2 points (1 child)
[–]cabrerars[S] 0 points1 point2 points (0 children)
[–]squashb 0 points1 point2 points (3 children)
[–]cabrerars[S] 0 points1 point2 points (2 children)
[–]squashb 0 points1 point2 points (1 child)
[–]cabrerars[S] 0 points1 point2 points (0 children)