-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed jQuery dependencies #503
base: master
Are you sure you want to change the base?
Conversation
First of all, looking good. I like lean projects as well. However, jQuery also has quite a bit of advantages. First of all, browser compatibility. I like it that stuff just works for different platforms. Secondly, jQuery can also remove bloat from a project. Most people already include it, especially if they use other javascript heavy libs, like this one. As you can see your commits actually added lines to the codebase, because stuff in jQuery needs to be emulated. This can be solved (like some other libs do) by building a version of the library that needs jquery and one that is stand alone. This is something that would have to be added for me to agree to these commits. I would love to know what de other developers think of this. |
Reflecting back on this now, I see increasingly libs are decoupling from jQuery (e.g. recent Velocity.js changes) so making jQuery optional / only for older browser support is interesting. |
As far as I'm concerned, this code don't break compatibility with any browser currently supported, and don't create any new critical issues. In fact, all it does are improvements. Its always better to use vanilla JavaScript instead of third part libraries, its better for performance, it becomes more independent, it leaves to the user the choice to use or not other libraries, etc. Of course its not that jQuery is bad, but if we can make a plugin work universally and be agnostic from most libraries (yeah Raphael.js still a must of course), why not do it? I'm voting up for this and don't see any reasonable reason not to accept it. 👍 |
The changes should support IE8+ and jQuery 2.x only supports IE9+. So it is actually more browser compatible in some cases. The added code is also quite minimal. |
👍 Totaly agree, on hybrid application, I do not want to include jQuery. Modifications by @icetan should be merged |
Based on pull request morrisjs#503
I have removed jQuery to show how easily this library would not need to depend on the extra bloat of jQuery. I really like the minimal nature of Morris.js and thought it would be great if it had less dependencies.
Anyway please tell me what you think and if I can do anything to make the pull better. If you are interested at all that is :)