]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
explain how to use bootstrap 5 with jQuery
authorJohann-S <johann.servoire@gmail.com>
Sun, 4 Aug 2019 10:05:04 +0000 (12:05 +0200)
committerJohann-S <johann.servoire@gmail.com>
Sun, 4 Aug 2019 11:22:47 +0000 (13:22 +0200)
site/content/docs/4.3/getting-started/javascript.md

index 4e3e793dbf7f173b396413ae43d8b4ceb48a6f57..a6fd3d92dfeefe10964f522e5f38e533405663e3 100644 (file)
@@ -37,6 +37,10 @@ Some plugins and CSS components depend on other plugins. If you include plugins
 
 Our dropdowns, popovers and tooltips also depend on [Popper.js](https://popper.js.org/).
 
+## Still wanting to use jQuery? It's possible!
+
+Bootstrap 5 is designed to be used without jQuery, but it's still possible to use our components with jQuery. **If Bootstrap detect `jQuery` in the window object** it'll add all of our components in jQuery's plugin system, it means you'll be able to do: `$('[data-toggle="tooltip"]').tooltip()` to enable tooltips and the same goes for our other components.
+
 ## Data attributes
 
 Nearly all Bootstrap plugins can be enabled and configured through HTML alone with data attributes (our preferred way of using JavaScript functionality). Be sure to **only use one set of data attributes on a single element** (e.g., you cannot trigger a tooltip and modal from the same button.)