diff --git a/docs/javascript.html b/docs/javascript.html index 8a4636bb3d..47cd34414b 100644 --- a/docs/javascript.html +++ b/docs/javascript.html @@ -85,9 +85,9 @@ $('#modal-content').modal({ closeOnEscape: true })
Trigger events to make things happen!
+Bootstraps modal class makes use of custom events. You can use trigger
to make things happen manually or bind
to listen for things happening.
Toggle the modal open state.
+Toggle the modal open state.
$('#modal-content').trigger('modal:toggle')
Opens the modal.
@@ -95,8 +95,21 @@ $('#modal-content').modal({Closes the modal.
$('#modal-content').trigger('modal:hide')+
Fired when the modal has been made visible.
++$('#modal-content') + .bind('modal:shown', function () { + // do something here... + })+
Fired when the modal has become hidden
++$('#modal-content') + .bind('modal:hidden', function () { + $(this).remove() // cleanup jQuery plugin data on hide + })