Commit 5bf13914 authored by fat's avatar fat

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

parent 6405442e
...@@ -1448,7 +1448,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery" ...@@ -1448,7 +1448,9 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
var content = this.getContent() var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) $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') $tip.removeClass('fade top bottom left right in')
......
This diff is collapsed.
This diff is collapsed.
...@@ -43,7 +43,9 @@ ...@@ -43,7 +43,9 @@
var content = this.getContent() var content = this.getContent()
$tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title) $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') $tip.removeClass('fade top bottom left right in')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment