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