Commit e55feacf authored by Jayanth Koushik's avatar Jayanth Koushik Committed by Heinrich Fenkart

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

Fixes #14950.
Closes #15015 by merging it.
parent 0d291e86
......@@ -12,6 +12,12 @@
<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>
<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 class="bs-callout bs-callout-warning">
<h4>Popovers in button groups and input groups require special setting</h4>
......
......@@ -61,6 +61,13 @@
<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>
<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 class="bs-callout bs-callout-warning">
<h4>Tooltips in button groups and input groups require special setting</h4>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment