aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes
diff options
context:
space:
mode:
authorJayanth Koushik <[email protected]>2014-11-04 22:20:34 +0530
committerHeinrich Fenkart <[email protected]>2014-11-04 20:00:08 +0100
commite55feacf5be152694205b14491ad626537756314 (patch)
tree93b2b5011922e4073091f25c2e8184e9ca9a8a29 /docs/_includes
parent0d291e862324bda24445e093651d6b5fe4f2d4c7 (diff)
downloadbootstrap-e55feacf5be152694205b14491ad626537756314.tar.xz
bootstrap-e55feacf5be152694205b14491ad626537756314.zip
Add initialization examples to tooltip and popover "Opt-in functionality" callouts
Fixes #14950. Closes #15015 by merging it.
Diffstat (limited to 'docs/_includes')
-rw-r--r--docs/_includes/js/popovers.html6
-rw-r--r--docs/_includes/js/tooltips.html7
2 files changed, 13 insertions, 0 deletions
diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html
index 7739c685e..09b8f36eb 100644
--- a/docs/_includes/js/popovers.html
+++ b/docs/_includes/js/popovers.html
@@ -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>
diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html
index 3ec076b70..87893608b 100644
--- a/docs/_includes/js/tooltips.html
+++ b/docs/_includes/js/tooltips.html
@@ -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>