0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Remove popover content with .children().detach() instead of .empty() so it can be reused

This commit is contained in:
Chris Hynes 2014-07-25 10:16:44 -07:00
parent f023ddc64e
commit 519a087dbe

View File

@ -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)