Bootstrap with CSS
- Bootstrap - Responsive utilities
- Bootstrap - Helper Classes
- Bootstrap - Images
- Bootstrap - Buttons
- Bootstrap - Forms
- Bootstrap - Tables
- Bootstrap - Code
- Bootstrap - Typography
- Bootstrap - CSS Overview
- Bootstrap - Grid System
Bootstrap Layout Components
- Bootstrap - Wells
- Bootstrap - Panels
- Bootstrap - List Group
- Bootstrap - Media Object
- Bootstrap - Progress Bars
- Bootstrap - Alerts
- Bootstrap - Thumbnails
- Bootstrap - Page Header
- Bootstrap - Jumbotron
- Bootstrap - Badges
- Bootstrap - Labels
- Bootstrap - Pagination
- Bootstrap - Breadcrumb
- Bootstrap - Navbar
- Bootstrap - Navigation Elements
- Bootstrap - Input Groups
- Bootstrap - Button Dropdowns
- Bootstrap - Button Groups
- Bootstrap - Dropdowns
- Bootstrap - Glyphicons
Bootstrap Plugins
- Bootstrap - Affix Plugin
- Bootstrap - Carousel Plugin
- Bootstrap - Collapse Plugin
- Bootstrap - Button Plugin
- Bootstrap - Alert Plugin
- Bootstrap - Popover Plugin
- Bootstrap - Tooltip Plugin
- Bootstrap - Tab Plugin
- Bootstrap - Scrollspy Plugin
- Bootstrap - Dropdown Plugin
- Bootstrap - Modal Plugin
- Bootstrap - Transition Plugin
- Bootstrap - Plugins Overview
Bootstrap Demos
- Bootstrap - featured Demo
- Bootstrap - Icons Demo
- Bootstrap - Social Icons Demo
- Bootstrap - Calendar Demo
- Bootstrap - Map Demo
- Bootstrap - Caption Demo
- Bootstrap - Tabbed slider Demo
- Bootstrap - Ajax Demo
- Bootstrap - Admin Interface Demo
- Bootstrap - Alert Demo
- Bootstrap - Time line Demo
- Bootstrap - Slider Demo
- Bootstrap - Material Design Demo
- Bootstrap - Blog Demo
- Bootstrap - Navigation Demo
- Bootstrap - Responsive Demo
- Bootstrap - Images Demo
- Bootstrap - Buttons Demo
- Bootstrap - Form Demo
- Bootstrap - Table Demo
- Bootstrap - Grid Demo
Bootstrap Useful Resources
- Bootstrap - Discussion
- Bootstrap - Useful Resources
- Bootstrap - Quick Guide
- Bootstrap - Questions and Answers
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Bootstrap - Plugins Overview
The components discussed in the previous chapters under Layout Components are just the beginning. Bootstrap comes bundled with 12 jQuery plugins that extend the features and can add more interaction to your site. To get started with the Bootstrap’s JavaScript plugins, you don’t need to be an advanced JavaScript developer. By utipzing Bootstrap Data API, most of the plugins can be triggered without writing a single pne of code.
Bootstrap Plugins can be included on your site in two forms −
Inspanidually − Using Bootstrap s inspanidual *.js files. Some plugins and CSS components depend on other plugins. If you include plugins inspanidually, make sure to check for these dependencies in the docs.
Or compiled (all at once) − Using bootstrap.js or the minified bootstrap.min.js. Do not attempt to include both, as both bootstrap.js and bootstrap.min.js contain all plugins in a single file.
All plugins depend on jQuery. So jQuery must be included before the plugin files. Checkto see which versions of jQuery are supported.
Data Attributes
All of the Bootstrap plugins are accessible using the included Data API. Hence, you don’t need to include a single pne of JavaScript to invoke any of the plugin features.
In some situations it may be desirable to turn this functionapty of Data API off. If you need to turn off the Data API, you can unbind the attributes by adding the following pne of JavaScript −
$(document).off( .data-api )
To turn off a specific/single plugin, just include the plugin s name as a namespace along with the data-api namespace pke this −
$(document).off( .alert.data-api )
Programmatic API
The developers of Bootstrap bepeve that you should be able to use all of the plugins purely through the JavaScript API. All pubpc APIs are single, chainable methods, and return the collection acted upon say for example −
$(".btn.danger").button("toggle").addClass("fat")
All methods accept an optional options object, a string which targets a particular method, or nothing (which initiates a plugin with default behavior) as shown below −
// initiapzed with defaults $("#myModal").modal() // initiapzed with no keyboard $("#myModal").modal({ keyboard: false }) // initiapzes and invokes show immediately $("#myModal").modal( show )
Each plugin also exposes its raw constructor on a Constructor property: $.fn.popover.Constructor. If you d pke to get a particular plugin instance, retrieve it directly from an element −
$( [rel = popover] ).data( popover ).
No Confpct
Bootstrap plugins can sometimes be used with other UI frameworks. In these circumstances, namespace colpsions can occasionally occur. To overcome this call .noConfpct on the plugin you wish to revert the value of.
// return $.fn.button to previously assigned value var bootstrapButton = $.fn.button.noConfpct() // give $().bootstrapBtn the Bootstrap functionapty $.fn.bootstrapBtn = bootstrapButton
Events
Bootstrap provides custom events for most plugin s unique actions. Generally, these events come in two forms −
Infinitive form − This is triggered at the start of an event. E.g. show. Infinitive events provide preventDefault functionapty. This provides the abipty to stop the execution of an action before it starts.
$( #myModal ).on( show.bs.modal , function (e) { // stops modal from being shown if (!data) return e.preventDefault() })
Past participle form − This is triggered on the completion of an action. E.g. shown.