Skip to content
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

refactor to avoid jQuery #5

Open
danieljuhl opened this issue Oct 31, 2015 · 6 comments
Open

refactor to avoid jQuery #5

danieljuhl opened this issue Oct 31, 2015 · 6 comments
Labels

Comments

@danieljuhl
Copy link

As far as I can see, jQuery is loaded only to use getScript(). Would it be an idea to refactor to vanilla JS instead? I'm happy to give it a try, if you interested in a PR. I don't like loading jQuery just for that single method.

@dennybritz
Copy link
Owner

I'm definitely in favor of removing dependencies, but I think jQuery is also required by the Bootstrap Javascript, isn't it?

@danieljuhl
Copy link
Author

Yes, but only if you actually use any of the JavaScript. Right now it would be possible to use markup components only, but neal would still require jQuery for eg. Google Analytics. So I would like to avoid using jQuery for getScript, and only load it, if the Bootstrap JS is actually used.

@danieljuhl
Copy link
Author

At least thats how Bootstrap v3 is - but I don't think Bootstrap v4 has changed on that part.

@dennybritz
Copy link
Owner

That's a good point, I'm not sure which Bootstrap components use the Javascript, the only one I'm sure about is the modal dialog. Let's do it and remove the jQuery dependency. Would be great if you want to work on that :)

In that case we should also add something to the README that defines for which components the user needs to include jQuery.

@danieljuhl
Copy link
Author

I just looked, at it is not as clear at the new bootstrap site, but lets remove jQuery and simple apply info in the docs for neal, about which comp. required jQuery (when we know for sure it requires it) - I'll look into Bootstrap v4 at the same time, to see which comp. are in play.

@LorbusChris
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants