-
Notifications
You must be signed in to change notification settings - Fork 102
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
Removing the jQuery dependency #3
Comments
@foleyatwork has removed the jQuery dependency in his fork. https://github.com/foleyatwork/responsive-elements I'd love to merge it in once it gets tested well enough and works rock solid on all platforms and scenarios. For now, jQuery seems a bit more stable. But in time, I'd like to remove the dependancy. |
I think three things need to happen before we can remove the dependency on Kumail's official version.
|
The current library supports almost all versions of IE. I don't mind dropping support for older versions but it would be nice to support atleast IE8 and above. It is worth noting that el.clientWidth is implemented differently across browsers: I really like how you abstracted out the breakpoint parsing into the parseBreakpointClasses method. Good work! :) A more practical approach would be to convert all the easy, no-brainer stuff to just javascript. Like removing |
regarding the idea that classList is "not widely supported"... there are very good shims. Wouldn't it be better to conditionally load a shim rather than loosing the work that classList provides as a native object in browsers that do support it? Also, by using a conditionally loaded shim approach if there are other plugins within a project that may have (or will) shim in classList there's no risk of loading multiple regex solutions for those plugins. |
Hi Kumail,
this project is just a great idea!
I was a bit curious why it needs jQuery so I looked into the code and saw that the use can easily be replaced with pure JavaScript.
Therefore I propose to remove the dependency.
The text was updated successfully, but these errors were encountered: