1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00
twbs--bootstrap/js
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
..
dist grunt babel:dev 2015-08-26 01:27:45 -07:00
src Accept elements as the tooltip / popover content 2015-08-31 01:06:13 +01:00
tests Accept elements as the tooltip / popover content 2015-08-31 01:06:13 +01:00
.eslintrc js/.eslintrc: sort rules by name. 2015-08-25 08:45:07 +03:00
.jscsrc es6 alert :| 2015-05-07 12:57:31 -07:00