aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohann <[email protected]>2017-03-23 22:22:09 +0100
committerGitHub <[email protected]>2017-03-23 22:22:09 +0100
commit3f247a42f2a113f9e04184987eae9019abcac778 (patch)
treee8dc2d8ff73cac05233bacb179a138e948b33100 /docs
parent37f438910fc50ca0b7b9959357fd302b4daf6930 (diff)
downloadbootstrap-3f247a42f2a113f9e04184987eae9019abcac778.tar.xz
bootstrap-3f247a42f2a113f9e04184987eae9019abcac778.zip
Fix Modal documentation about _handleUpdate method + move to public scope (#21877)
Fix Modal documentation about _handleUpdate method + move to public scope
Diffstat (limited to 'docs')
-rw-r--r--docs/components/modal.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/components/modal.md b/docs/components/modal.md
index deb25c4dc..96a11e1a2 100644
--- a/docs/components/modal.md
+++ b/docs/components/modal.md
@@ -410,7 +410,7 @@ For modals that simply appear rather than fade in to view, remove the `.fade` cl
### Dynamic heights
-If the height of a modal changes while it is open, you should call `$('#myModal').data('bs.modal').handleUpdate()` to readjust the modal's position in case a scrollbar appears.
+If the height of a modal changes while it is open, you should call `$('#myModal').data('bs.modal').handleUpdate()` or `$('#myModal').modal('handleUpdate')` to readjust the modal's position in case a scrollbar appears.
### Accessibility
@@ -575,6 +575,12 @@ Manually hides a modal. **Returns to the caller before the modal has actually be
{% highlight js %}$('#myModal').modal('hide'){% endhighlight %}
+#### `.modal('handleUpdate')`
+
+Manually readjust the modal's position if the height of a modal changes while it is open (i.e. in case a scrollbar appears).
+
+{% highlight js %}$('#myModal').modal('handleUpdate'){% endhighlight %}
+
### Events
Bootstrap's modal class exposes a few events for hooking into modal functionality. All modal events are fired at the modal itself (i.e. at the `<div class="modal">`).