aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRod Vagg <[email protected]>2011-11-05 10:50:08 +1100
committerRod Vagg <[email protected]>2011-11-05 10:50:08 +1100
commitf6a258ef36c0e9383b35e8f33cda14ba4718e0f3 (patch)
tree96f684c2e3f0f5581d852b9bf7e234e5b4b32a3d
parent32086c7de59b9a17701aa689225e369d15ac454a (diff)
downloadbootstrap-f6a258ef36c0e9383b35e8f33cda14ba4718e0f3.tar.xz
bootstrap-f6a258ef36c0e9383b35e8f33cda14ba4718e0f3.zip
optionable selectors for title & content elements
-rw-r--r--js/bootstrap-popover.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js
index cf6dadf0a..128bc5412 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: '<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 ); \ No newline at end of file
+}( window.jQuery || window.ender );