From: Jayanth Koushik Date: Tue, 4 Nov 2014 16:50:34 +0000 (+0530) Subject: Add initialization examples to tooltip and popover "Opt-in functionality" callouts X-Git-Tag: v3.3.1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e55feacf5be152694205b14491ad626537756314;p=thirdparty%2Fbootstrap.git Add initialization examples to tooltip and popover "Opt-in functionality" callouts Fixes #14950. Closes #15015 by merging it. --- 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