From e55feacf5be152694205b14491ad626537756314 Mon Sep 17 00:00:00 2001 From: Jayanth Koushik Date: Tue, 4 Nov 2014 22:20:34 +0530 Subject: [PATCH] Add initialization examples to tooltip and popover "Opt-in functionality" callouts Fixes #14950. Closes #15015 by merging it. --- docs/_includes/js/popovers.html | 6 ++++++ docs/_includes/js/tooltips.html | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/docs/_includes/js/popovers.html b/docs/_includes/js/popovers.html index 7739c685e0..09b8f36ebd 100644 --- a/docs/_includes/js/popovers.html +++ b/docs/_includes/js/popovers.html @@ -12,6 +12,12 @@

Opt-in functionality

For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

+

One way to initialize all popovers on a page would be to select them by their data-toggle attribute:

+{% highlight js %} +$(function () { + $('[data-toggle="popover"]').popover() +}) +{% endhighlight %}

Popovers in button groups and input groups require special setting

diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 3ec076b70b..87893608b5 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -61,6 +61,13 @@

Opt-in functionality

For performance reasons, the Tooltip and Popover data-apis are opt-in, meaning you must initialize them yourself.

+

One way to initialize all tooltips on a page would be to select them by their data-toggle attribute:

+{% highlight js %} +$(function () { + $('[data-toggle="tooltip"]').tooltip() +}) +{% endhighlight %} +

Tooltips in button groups and input groups require special setting

-- 2.47.2