0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-20 17:54:23 +01:00

optionable selectors for title & content elements

This commit is contained in:
Rod Vagg 2011-11-05 10:50:08 +11:00
parent 32086c7de5
commit f6a258ef36

View File

@ -36,8 +36,8 @@
setContent: function () {
var $tip = this.tip()
$tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
$tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent())
$tip.find(this.options.titleSelector)[this.options.html ? 'html' : 'text'](this.getTitle())
$tip.find(this.options.contentSelector)[this.options.html ? 'html' : 'text'](this.getContent())
$tip[0].className = 'popover'
}
@ -81,6 +81,8 @@
$.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, {
placement: 'right'
, template: '<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>'
, titleSelector: '.title'
, contentSelector: '.content p'
})
}( window.jQuery || window.ender );
}( window.jQuery || window.ender );