0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-28 00:54:30 +01:00
Gleb Mazovetskiy c7d8e7a077 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.
2015-08-31 01:06:13 +01:00
..
2015-08-14 22:45:55 -07:00
2015-08-21 02:15:17 +02:00
2015-08-22 13:52:27 -04:00
2015-08-23 04:56:09 +02:00
2015-08-14 22:45:55 -07:00
2015-08-27 08:14:39 +03:00
2015-08-25 15:38:20 +03:00
2015-08-29 18:50:20 +03:00
2015-08-14 22:45:55 -07:00
2015-08-14 22:45:55 -07:00
2015-08-17 00:42:41 -07:00
2015-08-29 18:50:20 +03:00
2015-08-18 01:18:21 -07:00
2015-08-20 22:02:54 -07:00
2015-08-29 18:50:20 +03:00