Comments (9)
I think using class
might not be the best choice here. You could export the main function directly.
Let me know if this is a welcome change, so I can take a closer look at it and open a PR.
from jump.js.
100% agree.
I have an article on Sitepoint in peer-review stage about smooth scrolling where I present a modified/refactored(that is, the core animation code is the same) version of Jump.js, and the above two suggestions by @electerious are two of the applied customizations.
Just my 0.02€,
mg
from jump.js.
@electerious @mgiulio you're both correct imo. all the options have sensible defaults, except the target and duration, which I'm fine with being required. I've been planning on a v1.0.0 release that removes the class
structure, and uses the revealing module pattern, similar to my libraries I've updated/released recently. I'm certainly open to a pull request accommodating this change if either of you are up to it. otherwise, I plan on getting around to it soon.
@mgiulio also super interested in the sitepoint article! happy to see people referencing, analyzing, and otherwise thinking about my code. let me know if you have any questions, or would like to co-author something. cheers 🍻
from jump.js.
Hi @callmecavs , sorry for the late reply.
I'm too busy for a PR now but I could send you the draft, so you can see my code changes and review the article. Just let me know.
mg
from jump.js.
Hi @callmecavs, the article is out !
from jump.js.
please see #31
from jump.js.
also, @mgiulio - as i said on Twitter - fantastic article. really well written, and I appreciate you analyzing and writing about my work. please let me know what you'd like to see in v1.0.0!
from jump.js.
@callmecavs Glad you liked it!
Looking forward to v1.0.0.
I appreciate your efforts to revisit common UX patterns with vanilla JavaScript solutions. I've also enjoyed Layzr.
from jump.js.
@mgiulio much appreciated sir.
i follow the "3 strikes rule" - write the same code 3 times, on 3 different websites, and it should probably be an open source library. common UX patterns typically fall into this category - relevant and needed on every site (way more than 3)
everything i make comes about because of that rule and/or frustration with current libraries that address the problem im trying to solve. i appreciate all the support my libraries have gotten, and contributions from people like yourself.
This library (Jump) is actually my most depended on according to npm stats. so its only right i gather feedback from the community, and launch a proper v1.0.0, that incorporates what people want/need
from jump.js.
Related Issues (20)
- Function not found due to wrong path HOT 8
- No module export HOT 3
- It is a nightmare to use this with my angular 2 application using system js for bundling HOT 1
- Sometimes callback executing before scrolling has finished HOT 1
- prevent calling jump() when current jump is not finished
- Is it possible to use Jump to replace the default behavior for the anchors? HOT 1
- Feature Request: Make target optional HOT 1
- Document why tabindex is necessary when a11y: true HOT 4
- Option to prevent anchor from beeing added to the URL? HOT 1
- Error in case of jumping to non-existing target HOT 1
- Bug in Chrome With Small Viewports -- Jump Effect with Flicker and Ignoring Offset HOT 2
- Scrolling Breaks When CSS Has Overflow. HOT 1
- Prevent jumping when position is the same
- MIT Licence not assigned on GH HOT 1
- Can we use GSAP Easings with Jump.js ? HOT 2
- Doesn't work with gulp? HOT 1
- Help needed with angular
- An old scholl version, really.. HOT 2
- Can't scroll back up the page
- Lazy loading images
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jump.js.