Skip to content

Commit f6a258e

Browse files
committed
optionable selectors for title & content elements
1 parent 32086c7 commit f6a258e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js/bootstrap-popover.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636

3737
setContent: function () {
3838
var $tip = this.tip()
39-
$tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
40-
$tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent())
39+
$tip.find(this.options.titleSelector)[this.options.html ? 'html' : 'text'](this.getTitle())
40+
$tip.find(this.options.contentSelector)[this.options.html ? 'html' : 'text'](this.getContent())
4141
$tip[0].className = 'popover'
4242
}
4343

@@ -81,6 +81,8 @@
8181
$.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
8282
placement: 'right'
8383
, template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
84+
, titleSelector: '.title'
85+
, contentSelector: '.content p'
8486
})
8587

86-
}( window.jQuery || window.ender );
88+
}( window.jQuery || window.ender );

0 commit comments

Comments
 (0)