Permalink
Browse files

added option in popover for displaying content and title as text inst…

…ead of html
  • Loading branch information...
1 parent b261f97 commit 11d6a9b95ba5982a58b79659d548d2c7ab2ff116 Peter Corsaro committed May 9, 2012
Showing with 9 additions and 2 deletions.
  1. +6 −0 docs/javascript.html
  2. +3 −2 js/bootstrap-popover.js
@@ -895,6 +895,12 @@ <h4 id="three">three</h4>
<td>apply a css fade transition to the tooltip</td>
</tr>
<tr>
+ <td>html</td>
+ <td>boolean</td>
+ <td>true</td>
+ <td>display content and title as html if detected in either field, otherwise display content and title as text</td>
+ </tr>
+ <tr>
<td>placement</td>
<td>string|function</td>
<td>'right'</td>
@@ -42,9 +42,10 @@
var $tip = this.tip()
, title = this.getTitle()
, content = this.getContent()
+ , o = this.options
- $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
- $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
+ $tip.find('.popover-title')[this.isHTML(title) && o.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content > *')[this.isHTML(content) && o.html ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}

0 comments on commit 11d6a9b

Please sign in to comment.