Skip to content

Commit

Permalink
Merge pull request #10338 from twbs/readd-optin-notes
Browse files Browse the repository at this point in the history
Fix #10324: Add opt-in note to tooltip docs
  • Loading branch information
mdo committed Sep 11, 2013
2 parents 37933a9 + 1ebd282 commit 6ea2893
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions javascript.html
Expand Up @@ -461,6 +461,8 @@ <h3>Via data attributes</h3>
<a id="dLabel" role="button" data-toggle="dropdown" data-target="#" href="/page.html">
Dropdown <span class="caret"></span>
</a>


<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
...
</ul>
Expand Down Expand Up @@ -824,6 +826,10 @@ <h3>Four directions</h3>
</div>
</div><!-- /example -->

<div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
</div>
<div class="bs-callout bs-callout-info">
<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>
Expand Down Expand Up @@ -990,6 +996,10 @@ <h2 id="popovers-examples">Examples</h2>
<h4>Plugin dependency</h4>
<p>Popovers require the <a href="#tooltips">tooltip plugin</a> to be included in your version of Bootstrap.</p>
</div>
<div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4>
<p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
</div>
<div class="bs-callout bs-callout-info">
<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>
Expand Down Expand Up @@ -1021,6 +1031,7 @@ <h3 class="popover-title">Popover right</h3>
<div class="popover bottom">
<div class="arrow"></div>
<h3 class="popover-title">Popover bottom</h3>

<div class="popover-content">
<p>Sed posuere consectetur est at lobortis. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p>
</div>
Expand Down Expand Up @@ -1146,9 +1157,6 @@ <h4>Data attributes for individual popovers</h4>
<p>Options for individual popovers can alternatively be specified through the use of data attributes, as explained above.</p>
</div>

<h3>Markup</h3>
<p>For performance reasons, the Tooltip and Popover data-apis are opt in. If you would like to use them just specify a selector option.</p>

<h3>Methods</h3>
<h4>$().popover(options)</h4>
<p>Initializes popovers for an element collection.</p>
Expand Down

0 comments on commit 6ea2893

Please sign in to comment.