Add Twitter Bootstrap javascript from CDN as a require.js module shim. With fallback to local version when CDN is offline.
-
composer require weprovide/magento2-module-twitterbootstrap-js
will install the latest version. If you want a specific Twitter Bootstrap version you can use this:
composer require timneutkens/magento2-module-twitterbootstrap-js:<version here>
-
Run
bin/magento setup:upgrade
-
Run
bin/magento setup:static-content:deploy
- 3.3.7
For usage examples see the Twitter Bootstrap website
require(['jquery', 'jquery.bootstrap'], function ($) {
$('.element').carousel()
});