From f6a258ef36c0e9383b35e8f33cda14ba4718e0f3 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Sat, 5 Nov 2011 10:50:08 +1100 Subject: [PATCH] optionable selectors for title & content elements --- js/bootstrap-popover.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js index cf6dadf0a5..128bc54127 100644 --- a/js/bootstrap-popover.js +++ b/js/bootstrap-popover.js @@ -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: '

' + , titleSelector: '.title' + , contentSelector: '.content p' }) -}( window.jQuery || window.ender ); \ No newline at end of file +}( window.jQuery || window.ender );