Skip to content

Instantly share code, notes, and snippets.

@rscata
Created June 12, 2013 14:49
Show Gist options
  • Save rscata/5765950 to your computer and use it in GitHub Desktop.
Save rscata/5765950 to your computer and use it in GitHub Desktop.
modal example
<a class="btn" data-toggle="modal" href="#myModal">Launch Modal</a>
<div class="modal hide" id="myModal">
<div class="modal-header">
<button class="close" data-dismiss="modal">×</button>
<h3>Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
<a href="#" class="btn btn-primary">Save changes</a>
</div>
</div>
$("#myModal").modal() // initialized with defaults
$("#myModal").modal({ keyboard: false }) // initialized with no keyboard
$("#myModal").modal('show') // initializes and invokes show immediately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment