Skip to content

Instantly share code, notes, and snippets.

@marc-gist
Last active September 26, 2019 20:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marc-gist/5495576 to your computer and use it in GitHub Desktop.
Save marc-gist/5495576 to your computer and use it in GitHub Desktop.
bootstrap modal with jquery show button
<script>
/* to show modal via jquery clock event bound to id="modal_button_id" a/button/etc */
$(document).ready(function() {
$('#modal_button_id').click(function (event) {
$('#myModal').modal('show')
});
</script>
<div class="modal hide fade" id="modalID">
<div class="modal-header">
<a class="close" data-dismiss="modal">&times;</a>
<div>TITLE</div>
</div>
<div class="modal-body">
Modal Body
</div>
<div class="modal-footer">
<a data-dismiss="modal" class="close">Close</a>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment