1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-19 03:41:19 +02:00

remake and add isHTML check to popover as well

This commit is contained in:
Jacob Thornton
2012-04-04 15:02:30 -07:00
parent 4bd611884a
commit 83febb3452
5 changed files with 17 additions and 7 deletions

View File

@@ -38,8 +38,8 @@
, title = this.getTitle()
, content = this.getContent()
$tip.find('.popover-title').html(title)
$tip.find('.popover-content > *').html(content)
$tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
$tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}

View File

@@ -167,9 +167,8 @@
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
, isHTML = this.isHTML(title)
$tip.find('.tooltip-inner')[isHTML ? 'html' : 'text'](title)
$tip.find('.tooltip-inner')[this.isHTML(title) ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}