From c7d8e7a0777da91df2359655a7132e2b55482c0a Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Mon, 31 Aug 2015 00:57:16 +0100 Subject: Accept elements as the tooltip / popover content When a DOM node is passed to an HTML tooltip, the `title` node is only moved if it is not already in the tooltip. Otherwise, `empty()` is used instead of `detach()` before appending the `title` to avoid memory leaks. If a DOM node is passed to a plain text tooltip, its text is copied via jQuery `.text()`. Replaces `.detach()` with `.empty()`, as `.detach()` is almost never useful but instead leaks memory. The difference between `empty` and `detach` is that the latter keeps all the attached jQuery events/data. However, since we do not return the previous children, the user would have to keep these themselves, thus they can `detach()` if necessary. This is a port of https://github.com/twbs/bootstrap/pull/14552 to v4. --- docs/components/tooltips.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/components/tooltips.md') diff --git a/docs/components/tooltips.md b/docs/components/tooltips.md index 65bd2703b..f2936469b 100644 --- a/docs/components/tooltips.md +++ b/docs/components/tooltips.md @@ -203,7 +203,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap title - string | function + string | element | function ''

Default title value if title attribute isn't present.

-- cgit v1.2.3 From 8e29c43c467c25cbb30ca9be0223c08571d54f65 Mon Sep 17 00:00:00 2001 From: Zearin Date: Mon, 7 Sep 2015 10:07:35 -0400 Subject: =?UTF-8?q?Fix=20usage=20of=20=E2=80=9Cits=E2=80=9D=20and=20?= =?UTF-8?q?=E2=80=9Cit=E2=80=99s=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/components/tooltips.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/components/tooltips.md') diff --git a/docs/components/tooltips.md b/docs/components/tooltips.md index f2936469b..85f3e63b6 100644 --- a/docs/components/tooltips.md +++ b/docs/components/tooltips.md @@ -226,7 +226,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap offsets string '0 0' - Offset of the popover relative to it's target. For more information refer to Tether's offset docs. + Offset of the popover relative to its target. For more information refer to Tether's offset docs. -- cgit v1.2.3