02.06.2015 Views

Bootstrap Tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<br />

This Modal title<br />

<br />

<br />

<br />

Press ESC button to exit.<br />

<br />

<br />

Close<br />

<br />

<br />

Submit changes<br />

<br />

<br />

<br />

<br />

<br />

<br />

$(function () { $('#myModal').modal({<br />

keyboard: true<br />

})});<br />

<br />

Just click the Esc button and the modal window exits.<br />

Events<br />

Following table lists the events to work with modal. These events may be used to hook into the function.<br />

Event Description Example<br />

show.bs.modal<br />

Fired after the show method is called.<br />

$('#identifier').on('show.bs.modal',<br />

function () {<br />

// do something…<br />

})<br />

shown.bs.modal<br />

Fired when the modal has been made<br />

visible to the user (will wait for CSS<br />

transitions to complete).<br />

$('#identifier').on('shown.bs.modal',<br />

function () {<br />

// do something…<br />

})<br />

hide.bs.modal<br />

Fired when the hide instance method<br />

has been called.<br />

$('#identifier').on('hide.bs.modal',<br />

function () {<br />

TUTORIALS POINT<br />

Simply Easy Learning

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!