mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Update javascript.md
This commit is contained in:
parent
5538967381
commit
caa7117e23
@ -36,7 +36,7 @@ $(document).off('.alert.data-api')
|
|||||||
|
|
||||||
Bootstrap provides custom events for most plugins' unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. `show`) is triggered at the start of an event, and its past participle form (ex. `shown`) is triggered on the completion of an action.
|
Bootstrap provides custom events for most plugins' unique actions. Generally, these come in an infinitive and past participle form - where the infinitive (ex. `show`) is triggered at the start of an event, and its past participle form (ex. `shown`) is triggered on the completion of an action.
|
||||||
|
|
||||||
All infinitive events provide [`preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) functionality. This provides the ability to stop the execution of an action before it starts. Returning false from an event handler will also automatically call `preventDefault()`
|
All infinitive events provide [`preventDefault()`](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault) functionality. This provides the ability to stop the execution of an action before it starts. Returning false from an event handler will also automatically call `preventDefault()`.
|
||||||
|
|
||||||
{% highlight js %}
|
{% highlight js %}
|
||||||
$('#myModal').on('show.bs.modal', function (e) {
|
$('#myModal').on('show.bs.modal', function (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user