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/popovers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/components/popovers.md') diff --git a/docs/components/popovers.md b/docs/components/popovers.md index 98672d23e..f48d860ea 100644 --- a/docs/components/popovers.md +++ b/docs/components/popovers.md @@ -193,7 +193,7 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap content - string | function + string | element | function ''

Default content value if data-content attribute isn't present.

@@ -245,7 +245,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/popovers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/components/popovers.md') diff --git a/docs/components/popovers.md b/docs/components/popovers.md index f48d860ea..3b9753aa5 100644 --- a/docs/components/popovers.md +++ b/docs/components/popovers.md @@ -268,7 +268,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