aboutsummaryrefslogtreecommitdiff
path: root/docs/components/modal.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/components/modal.md')
-rw-r--r--docs/components/modal.md13
1 files changed, 11 insertions, 2 deletions
diff --git a/docs/components/modal.md b/docs/components/modal.md
index deb25c4dc..19254b880 100644
--- a/docs/components/modal.md
+++ b/docs/components/modal.md
@@ -63,7 +63,7 @@ Below is a _static_ modal example (meaning its `position` and `display` have bee
</div>
{% highlight html %}
-<div class="modal fade">
+<div class="modal">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@@ -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
@@ -547,6 +547,9 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
### Methods
+{% capture callout-include %}{% include callout-danger-async-methods.md %}{% endcapture %}
+{{ callout-include | markdownify }}
+
#### `.modal(options)`
Activates your content as a modal. Accepts an optional options `object`.
@@ -575,6 +578,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">`).