From 8534e12523c7156b53e76393cc8d016ffdcf5b4f Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 20 Jan 2014 11:54:22 -0800 Subject: Add tooltip `viewport` option, respect bounds of the viewport --- docs/_includes/js/tooltips.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 2656556be..b952e8504 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -134,6 +134,14 @@ $('#example').tooltip(options)

Appends the tooltip to a specific element. Example: container: 'body'

+ + viewport + string | object + { selector: 'body', padding: 0 } + +

Keeps the tooltip within the bounds of this element. Example: viewport: '#viewport' or { selector: '#viewport', padding: 0 }

+ + -- cgit v1.2.3 From 7c50859e9338512dfb70e5b512e67c95725f0f1a Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Tue, 25 Mar 2014 19:12:16 -0700 Subject: Document `template` option of tooltip & popover; fixes #13088 Also capitalize column titles and descriptions. --- docs/_includes/js/tooltips.html | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index b952e8504..83ef82e06 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -74,9 +74,9 @@ $('#example').tooltip(options) Name - type - default - description + Type + Default + Description @@ -84,7 +84,7 @@ $('#example').tooltip(options) animation boolean true - apply a CSS fade transition to the tooltip + Apply a CSS fade transition to the tooltip html @@ -96,7 +96,7 @@ $('#example').tooltip(options) placement string | function 'top' - how to position the tooltip - top | bottom | left | right | auto.
When "auto" is specified, it will dynamically reorient the tooltip. For example, if placement is "auto left", the tooltip will display to the left when possible, otherwise it will display right. + How to position the tooltip - top | bottom | left | right | auto.
When "auto" is specified, it will dynamically reorient the tooltip. For example, if placement is "auto left", the tooltip will display to the left when possible, otherwise it will display right. selector @@ -104,24 +104,35 @@ $('#example').tooltip(options) false If a selector is provided, tooltip objects will be delegated to the specified targets. + + template + string + '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>' + +

Base HTML to use when creating the tooltip.

+

The tooltip's title will be injected into the .tooltip-inner.

+

.tooltip-arrow will become the tooltip's arrow.

+

The outermost wrapper element should have the .tooltip class.

+ + title string | function '' - default title value if title attribute isn't present + Default title value if title attribute isn't present trigger string 'hover focus' - how tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. + How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. delay number | object 0 -

delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

+

Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

Object structure is: delay: { show: 500, hide: 100 }

-- cgit v1.2.3 From 9c25f5c06ee54c681919343524a55ebe9904c0ab Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 24 Apr 2014 18:06:42 -0700 Subject: document that show-ing a tooltip/popover on a hidden element doesn't work; fixes #13362 --- docs/_includes/js/tooltips.html | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 83ef82e06..64ea06e85 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -36,6 +36,10 @@

Tooltips in button groups and input groups require special setting

When using tooltips on elements within a .btn-group or an .input-group, you'll have to specify the option container: 'body' (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).

+
+

Don't try to show tooltips on hidden elements

+

Invoking $(...).tooltip('show') when the target element is display: none; will cause the tooltip to be incorrectly positioned.

+

Tooltips on disabled elements require wrapper elements

To add a tooltip to a disabled or .disabled element, put the element inside of a <div> and apply the tooltip to that <div> instead.

-- cgit v1.2.3 From 99f6f700f47154c8126bfbdceadcd3a45627801a Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 14 May 2014 18:12:18 -0700 Subject: docs: sort tooltip & container options for sanity --- docs/_includes/js/tooltips.html | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 64ea06e85..4d91da640 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -90,6 +90,24 @@ $('#example').tooltip(options) true Apply a CSS fade transition to the tooltip + + container + string | false + false + +

Appends the tooltip to a specific element. Example: container: 'body'

+ + + + delay + number | object + 0 + +

Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

+

If a number is supplied, delay is applied to both hide/show

+

Object structure is: delay: { show: 500, hide: 100 }

+ + html boolean @@ -131,24 +149,6 @@ $('#example').tooltip(options) 'hover focus' How tooltip is triggered - click | hover | focus | manual. You may pass multiple triggers; separate them with a space. - - delay - number | object - 0 - -

Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

-

If a number is supplied, delay is applied to both hide/show

-

Object structure is: delay: { show: 500, hide: 100 }

- - - - container - string | false - false - -

Appends the tooltip to a specific element. Example: container: 'body'

- - viewport string | object -- cgit v1.2.3 From 6fdbd8e3cf90d1beaccc60396d30303287b4b1b8 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 14 May 2014 18:19:50 -0700 Subject: add 'selector' option motivation to tooltip docs --- docs/_includes/js/tooltips.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 4d91da640..72096b368 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -124,7 +124,7 @@ $('#example').tooltip(options) selector string false - If a selector is provided, tooltip objects will be delegated to the specified targets. + If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have tooltips added. See this and an informative example. template -- cgit v1.2.3 From 3465d984fb934b1616b8d4ecf394b997cd1f0fab Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Wed, 14 May 2014 18:23:58 -0700 Subject: add 'container' option motivation to tooltip docs --- docs/_includes/js/tooltips.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 72096b368..e967878f8 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -95,7 +95,7 @@ $('#example').tooltip(options) string | false false -

Appends the tooltip to a specific element. Example: container: 'body'

+

Appends the tooltip to a specific element. Example: container: 'body'. This option is particularly useful in that it allows you to position the tooltip in the flow of the document near the triggering element - which will prevent the tooltip from floating away from the triggering element during a window resize.

-- cgit v1.2.3 From 5e6967358fce043f847de2588b6d685f6a518eab Mon Sep 17 00:00:00 2001 From: Heinrich Fenkart Date: Thu, 12 Jun 2014 05:03:40 +0200 Subject: Update generated markup by the tooltip plugin in docs; fixes #13796 --- docs/_includes/js/tooltips.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index e967878f8..5a43c1ddd 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -63,11 +63,11 @@ $('#example').tooltip(options) Hover over me -
+ {% endhighlight %} -- cgit v1.2.3 From d23d9ee4a01a3db0fb2b843bbd7b69814a91790b Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 29 Jun 2014 19:58:09 -0700 Subject: fix #13979 --- docs/_includes/js/tooltips.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 5a43c1ddd..858a91ec3 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -58,7 +58,7 @@ $('#example').tooltip(options)

Multiple-line links

Sometimes you want to add a tooltip to a hyperlink that wraps multiple lines. The default behavior of the tooltip plugin is to center it horizontally and vertically. Add white-space: nowrap; to your anchors to avoid this.

-{% highlight html linenos %} +{% highlight html %} Hover over me -- cgit v1.2.3 From 48e35cb83010915aafaa8ee1fe7e9b5eb54045d8 Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Sun, 29 Jun 2014 21:08:27 -0700 Subject: docs: use valid JSON in compound option value examples Fixes #13874. [skip sauce] --- docs/_includes/js/tooltips.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/_includes/js/tooltips.html') diff --git a/docs/_includes/js/tooltips.html b/docs/_includes/js/tooltips.html index 858a91ec3..fac4f6519 100644 --- a/docs/_includes/js/tooltips.html +++ b/docs/_includes/js/tooltips.html @@ -105,7 +105,7 @@ $('#example').tooltip(options)

Delay showing and hiding the tooltip (ms) - does not apply to manual trigger type

If a number is supplied, delay is applied to both hide/show

-

Object structure is: delay: { show: 500, hide: 100 }

+

Object structure is: delay: { "show": 500, "hide": 100 }

@@ -154,7 +154,7 @@ $('#example').tooltip(options) string | object { selector: 'body', padding: 0 } -

Keeps the tooltip within the bounds of this element. Example: viewport: '#viewport' or { selector: '#viewport', padding: 0 }

+

Keeps the tooltip within the bounds of this element. Example: viewport: '#viewport' or { "selector": "#viewport", "padding": 0 }

-- cgit v1.2.3