diff options
| author | Chris Rebert <[email protected]> | 2014-04-24 19:16:09 -0700 |
|---|---|---|
| committer | Chris Rebert <[email protected]> | 2014-04-24 19:16:09 -0700 |
| commit | e0d1e406d361ac0ed8b9df60f52e14d39fceb084 (patch) | |
| tree | 9c3e22a45f270b41b3259680d1470322e06a5a25 /docs/_includes | |
| parent | 022dc30891dd435fb15a69a0830a92fd40c11b12 (diff) | |
| parent | 9c25f5c06ee54c681919343524a55ebe9904c0ab (diff) | |
| download | bootstrap-e0d1e406d361ac0ed8b9df60f52e14d39fceb084.tar.xz bootstrap-e0d1e406d361ac0ed8b9df60f52e14d39fceb084.zip | |
Merge pull request #13423 from twbs/fix-13362
document that show-ing a tooltip/popover on a hidden element doesn't work
Diffstat (limited to 'docs/_includes')
| -rw-r--r-- | docs/_includes/js/popovers.html | 4 | ||||
| -rw-r--r-- | docs/_includes/js/tooltips.html | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html index 95868af1a..b2f58fbc4 100644 --- a/docs/_includes/js/popovers.html +++ b/docs/_includes/js/popovers.html @@ -16,6 +16,10 @@ <h4>Popovers in button groups and input groups require special setting</h4> <p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p> </div> + <div class="bs-callout bs-callout-warning"> + <h4>Don't try to show popovers on hidden elements</h4> + <p>Invoking <code>$(...).popover('show')</code> when the target element is <code>display: none;</code> will cause the popover to be incorrectly positioned.</p> + </div> <div class="bs-callout bs-callout-info"> <h4>Popovers on disabled elements require wrapper elements</h4> <p>To add a popover to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the popover to that <code><div></code> instead.</p> diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 83ef82e06..64ea06e85 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -36,6 +36,10 @@ <h4>Tooltips in button groups and input groups require special setting</h4> <p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p> </div> + <div class="bs-callout bs-callout-warning"> + <h4>Don't try to show tooltips on hidden elements</h4> + <p>Invoking <code>$(...).tooltip('show')</code> when the target element is <code>display: none;</code> will cause the tooltip to be incorrectly positioned.</p> + </div> <div class="bs-callout bs-callout-info"> <h4>Tooltips on disabled elements require wrapper elements</h4> <p>To add a tooltip to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code><div></code> and apply the tooltip to that <code><div></code> instead.</p> |
