diff options
| author | Mark Otto <[email protected]> | 2013-08-12 09:53:24 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-08-12 09:53:24 -0700 |
| commit | 0c879d3ece1a6b1f70d1117a79876554e2ee6479 (patch) | |
| tree | 6949aa77be42eafc048a317409d683fe72196cee /javascript.html | |
| parent | 3ce2b645c7c0d4b92d3270b7f0aa6ee5f4b5bd3a (diff) | |
| parent | 587a001dcce9f8dcf223a1f0c7dbefc58efbd6ad (diff) | |
| download | bootstrap-0c879d3ece1a6b1f70d1117a79876554e2ee6479.tar.xz bootstrap-0c879d3ece1a6b1f70d1117a79876554e2ee6479.zip | |
Merge pull request #9381 from ggam/dropdown-events
Added Dropdown JS plugin events to docs
Diffstat (limited to 'javascript.html')
| -rw-r--r-- | javascript.html | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/javascript.html b/javascript.html index c3a6b0a32..c21842b07 100644 --- a/javascript.html +++ b/javascript.html @@ -478,9 +478,42 @@ $('.dropdown-toggle').dropdown() <h3>Methods</h3> <h4>$().dropdown('toggle')</h4> <p>Toggles the dropdown menu of a given navbar or tabbed navigation.</p> - </div> - + <h3>Events</h3> + <div class="bs-table-scrollable"> + <table class="table table-bordered table-striped"> + <thead> + <tr> + <th style="width: 150px;">Event Type</th> + <th>Description</th> + </tr> + </thead> + <tbody> + <tr> + <td>show.bs.dropdown</td> + <td>This event fires immediately when the show instance method is called.</td> + </tr> + <tr> + <td>shown.bs.dropdown</td> + <td>This event is fired when the dropdown has been made visible to the user (will wait for CSS transitions, to complete).</td> + </tr> + <tr> + <td>hide.bs.dropdown</td> + <td>This event is fired immediately when the hide instance method has been called.</td> + </tr> + <tr> + <td>hidden.bs.dropdown</td> + <td>This event is fired when the dropdown has finished being hidden from the user (will wait for CSS transitions, to complete).</td> + </tr> + </tbody> + </table> + </div><!-- ./bs-table-scrollable --> +{% highlight js %} +$('#myDropdown').on('show.bs.dropdown', function () { + // do something… +}) +{% endhighlight %} + </div> <!-- ScrollSpy ================================================== --> |
