This page illustrates how to integrate javascript with the Bootstrap library. Below we go over the basics and provide you with some awesome plugins to get you started!
With this example page, we've set out to make your interactive work with Bootstrap even more simple, offering several lightweight plugins for things like modals, tooltips, and other dynamic components. These plugins have been coded up to work with jQuery and Ender, but we encourage you to extend and modify them to fit your development needs!
The short answer is NO! These plugins were provided to help you understand how to integrate bootstrap with javascript and to give you a quick lightweight option for dropping something in and getting the basic functionality.
Our Modal plugin is super slim! We took special care to only include the bare functionality that we require at twitter, however we look forward to seeing all the cool stuff you do with it!
$('#modal-content').modal();
boolean
) - if true, it will include a modal-backdrop element.boolean
) - if true, it will close the modal when escape key is pressed.string
) - alternative way of supplying modal class with HTML content.Returns an instance of the modal class. It accepts either a string
or an options object
.
// Accepts HTML string $.modal(modalHTML) // Accepts Options $.modal({ backdrop: true , content: modalHTML })
Returns an instance of the modal class. Accepts an optional options object
.
$('#modal-content').modal({ closeOnEscape: true });
Returns an instance of the modal class. Toggle the modal open state.
$('#modal-content').modal().toggle()
Returns an instance of the modal class. Opens the modal.
$('#modal-content').modal().open()
Returns an instance of the modal class. Closes the modal.
$('#modal-content').modal().close()
One fine body…