0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-17 09:52:29 +01:00

Add initialization examples to tooltip and popover "Opt-in functionality" callouts

Fixes #14950.
Closes #15015 by merging it.
This commit is contained in:
Jayanth Koushik 2014-11-04 22:20:34 +05:30 committed by Heinrich Fenkart
parent 0d291e8623
commit e55feacf5b
2 changed files with 13 additions and 0 deletions

View File

@ -12,6 +12,12 @@
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4> <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> <p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>One way to initialize all popovers on a page would be to select them by their <code>data-toggle</code> attribute:</p>
{% highlight js %}
$(function () {
$('[data-toggle="popover"]').popover()
})
{% endhighlight %}
</div> </div>
<div class="bs-callout bs-callout-warning"> <div class="bs-callout bs-callout-warning">
<h4>Popovers in button groups and input groups require special setting</h4> <h4>Popovers in button groups and input groups require special setting</h4>

View File

@ -61,6 +61,13 @@
<div class="bs-callout bs-callout-danger"> <div class="bs-callout bs-callout-danger">
<h4>Opt-in functionality</h4> <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> <p>For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning <strong>you must initialize them yourself</strong>.</p>
<p>One way to initialize all tooltips on a page would be to select them by their <code>data-toggle</code> attribute:</p>
{% highlight js %}
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
{% endhighlight %}
</div> </div>
<div class="bs-callout bs-callout-warning"> <div class="bs-callout bs-callout-warning">
<h4>Tooltips in button groups and input groups require special setting</h4> <h4>Tooltips in button groups and input groups require special setting</h4>