I have googled this question numerous times and never found a satisfactory answer. Most answers seem only to say that "yes, Bootstrap plugins do require jQuery" or "yes, you can use BS without jQuery if you don't use the plugins". Bootstrap's reliance on jQuery (as described in their quick start) strikes me as a poor design decision, for at least the following reasons:
<script>
ed in before BS does not allow for very clear dependency resolution with modern bundlers like Webpack and SystemJS. Again, why didn't they use some kind of module-based dependency?So is there some reason, then, that the BS devs chose to rely on jQuery, in spite of all of the above? I probably could've just asked the BS devs directly with an Issue on their GitHub page, but I hoped that an SO question would be more accessible to future googlers with these questions.
Update Jan 2019: According to the Bootstrap docs, v5 is dropping the jQuery dependency, so hopefully that will arrive soon.
Update May 2021: Bootstrap v5 is out! As promised, this version has dropped jQuery, as described in the release blog post.
The Bootstrap 5 framework has removed jQuery as a requirement. It saved 85KB of minified JavaScript, which could be significant as Google starts to use page speed as a ranking factor for mobile web sites, and soon for desktop web sites as well.
Bootstrap 5 is designed to be used without jQuery, but it's still possible to use our components with jQuery. If Bootstrap detects jQuery in the window object it'll add all of our components in jQuery's plugin system; this means you'll be able to do $('[data-bs-toggle="tooltip"]').
Many of our components require the use of JavaScript to function. Specifically, they require jQuery, Popper. js, and our own JavaScript plugins.
Note that the functionalities of some JavaScript components like tabs and dropdowns depend on popper. js and jQuery. Hence, before loading the Bootstrap JavaScript file, include the jQuery and Popper CDN before loading the bootstrap. min.
In hindsight it's easy to judge (as you are doing rather shortsightedly), but back in 2011 jQuery was not considered bloated or outdated and was the main proven library that offered easy DOM access. So in that context it made perfect sense to use jQuery.
In fact, 6 years later there may still not be another library with the same robustness and feature set of jQuery.
Jquery is a popular frame work and lots of developers have experience writing in it, making their documentation easier to digest. It's also very good at dealing with a lot of the cross browser quirks that javascript presents.
If you really don't want to use Jquery, there is bootstrap native: http://thednp.github.io/bootstrap.native/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With