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 })

Events

-

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.

modal:toggle

-

Toggle the modal open state.

+

Toggle the modal open state.

$('#modal-content').trigger('modal:toggle')

modal:show

Opens the modal.

@@ -95,8 +95,21 @@ $('#modal-content').modal({

modal:hide

Closes the modal.

$('#modal-content').trigger('modal:hide')
+

modal:shown

+

Fired when the modal has been made visible.

+
+$('#modal-content')
+  .bind('modal:shown', function () {
+    // do something here...
+  })
+

modal:hidden

+

Fired when the modal has become hidden

+
+$('#modal-content')
+  .bind('modal:hidden', function () {
+    $(this).remove() // cleanup jQuery plugin data on hide
+  })

Demo

-