Can I use twitter bootstrap without jquery?

Twitter Bootstrap

Twitter Bootstrap Problem Overview


I work in a project where we don't use JQuery.

Is twitter bootstrap dependant on it ?

Twitter Bootstrap Solutions


Solution 1 - Twitter Bootstrap

Twitter bootstrap itself isn't jQuery dependant.

If you use just the CSS part of it, you won't need jQuery.

If you use the Javascript plugins you need jQuery, since they are jQuery plugins.

v3: http://getbootstrap.com/javascript/

v4: https://getbootstrap.com/docs/4.0/getting-started/javascript/

Solution 2 - Twitter Bootstrap

Short answer is yes but as Bruno says, the jQuery plugins won't work. To workaround this, I made a small replacement script so the dropdown menus, alert boxes and collapsible nav bar will work without jQuery: http://daniemon.com/blog/bootstrap-without-jquery/

Solution 3 - Twitter Bootstrap

Yes you can via Native Javascript for Bootstrap. Enjoy

Solution 4 - Twitter Bootstrap

Bootstrap 5 will be without jQuery dependency. Reference: Concerned PR

Solution 5 - Twitter Bootstrap

You do not need to use jQuery. Boostrap will perform better with native JavaScript than jQuery.

Try one of these:

  1. Bootstrap Native
  2. Bootstrap Native JavaScript
  3. Vue.js

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionZo72View Question on Stackoverflow
Solution 1 - Twitter BootstrapBruno CamposView Answer on Stackoverflow
Solution 2 - Twitter BootstraptagawaView Answer on Stackoverflow
Solution 3 - Twitter BootstrapthednpView Answer on Stackoverflow
Solution 4 - Twitter Bootstrapthe_spectatorView Answer on Stackoverflow
Solution 5 - Twitter BootstrapDan BrayView Answer on Stackoverflow