aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes
diff options
context:
space:
mode:
authorHeinrich Fenkart <[email protected]>2015-03-03 06:45:38 +0100
committerHeinrich Fenkart <[email protected]>2015-03-03 06:45:38 +0100
commitbe68cdd4b82aa120e72dbd2f6e84c9e0e3160939 (patch)
tree3d93910e1e3a5dc9ddea83e575c4525dac2dcbdc /docs/_includes
parentc1005f52839f56a49fea68cede63f29b35d77641 (diff)
downloadbootstrap-be68cdd4b82aa120e72dbd2f6e84c9e0e3160939.tar.xz
bootstrap-be68cdd4b82aa120e72dbd2f6e84c9e0e3160939.zip
Properly document Modal#handleUpdate
Diffstat (limited to 'docs/_includes')
-rw-r--r--docs/_includes/js/modal.html8
-rw-r--r--docs/_includes/nav/javascript.html1
2 files changed, 5 insertions, 4 deletions
diff --git a/docs/_includes/js/modal.html b/docs/_includes/js/modal.html
index 0e2de1d61..2e3233143 100644
--- a/docs/_includes/js/modal.html
+++ b/docs/_includes/js/modal.html
@@ -394,9 +394,6 @@ $('#exampleModal').on('show.bs.modal', function (event) {
})
{% endhighlight %}
- <h2 id="modals-handle-update">Modals with dynamic heights</h2>
- <p>If the height of a modal changes while it is open, you should call <code>$('#myModal').data('bs.modal').handleUpdate()</code> to readjust the modal's position in case a scrollbar appears.</p>
-
<h2 id="modals-usage">Usage</h2>
<p>The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds <code>.modal-open</code> to the <code>&lt;body&gt;</code> to override default scrolling behavior and generates a <code>.modal-backdrop</code> to provide a click area for dismissing shown modals when clicking outside the modal.</p>
@@ -479,6 +476,11 @@ $('#myModal').modal({
<p>Manually hides a modal. <strong>Returns to the caller before the modal has actually been hidden</strong> (i.e. before the <code>hidden.bs.modal</code> event occurs).</p>
{% highlight js %}$('#myModal').modal('hide'){% endhighlight %}
+ <h4>.modal('handleUpdate')</h4>
+ <p>Readjusts the modal's positioning to counter a scrollbar in case one should appear, which would make the modal jump to the left.</p>
+ <p>Only needed when the height of the modal changes while it is open.</p>
+ {% highlight js %}$('#myModal').modal('handleUpdate'){% endhighlight %}
+
<h3 id="modals-events">Events</h3>
<p>Bootstrap's modal class exposes a few events for hooking into modal functionality.</p>
<p>All modal events are fired at the modal itself (i.e. at the <code>&lt;div class="modal"&gt;</code>).</p>
diff --git a/docs/_includes/nav/javascript.html b/docs/_includes/nav/javascript.html
index 8e8b830e1..eba53771b 100644
--- a/docs/_includes/nav/javascript.html
+++ b/docs/_includes/nav/javascript.html
@@ -19,7 +19,6 @@
<li><a href="#modals-sizes">Sizes</a></li>
<li><a href="#modals-remove-animation">Remove animation</a></li>
<li><a href="#modals-related-target">Varying content based on trigger button</a></li>
- <li><a href="#modals-handle-update">Modals with dynamic heights</a></li>
<li><a href="#modals-usage">Usage</a></li>
<li><a href="#modals-options">Options</a></li>
<li><a href="#modals-methods">Methods</a></li>