aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Hynes <[email protected]>2014-07-25 10:16:44 -0700
committerChris Hynes <[email protected]>2014-07-25 10:16:44 -0700
commit519a087dbed55e3e350c5a7251ae3d76d195e47d (patch)
tree91f58ed8a598abff80bd203563d17f01b4b33889
parentf023ddc64e80cad29e47eb9a5d8b2abf681fa544 (diff)
downloadbootstrap-519a087dbed55e3e350c5a7251ae3d76d195e47d.tar.xz
bootstrap-519a087dbed55e3e350c5a7251ae3d76d195e47d.zip
Remove popover content with .children().detach() instead of .empty() so it can be reused
-rw-r--r--js/popover.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/popover.js b/js/popover.js
index 825e1b390..130c6c085 100644
--- a/js/popover.js
+++ b/js/popover.js
@@ -46,7 +46,8 @@
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events
+ $tip.find('.popover-content').children().detach()
+ $tip.find('.popover-content')[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)