1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

fixes #10658 jQuery Popover content loses bound events on second setContent call.

This commit is contained in:
fat 2013-12-28 20:59:45 -08:00
parent 6405442e66
commit 5bf13914e4
4 changed files with 8 additions and 4 deletions

View file

@ -1448,7 +1448,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.find('.popover-content')[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)
$tip.removeClass('fade top bottom left right in')

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -43,7 +43,9 @@
var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
$tip.find('.popover-content')[this.options.html ? 'html' : 'text'](content)
$tip.find('.popover-content')[ // we use append for html objects to maintain js events
this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
](content)
$tip.removeClass('fade top bottom left right in')