]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
optionable selectors for title & content elements
authorRod Vagg <rod@vagg.org>
Fri, 4 Nov 2011 23:50:08 +0000 (10:50 +1100)
committerRod Vagg <rod@vagg.org>
Fri, 4 Nov 2011 23:50:08 +0000 (10:50 +1100)
js/bootstrap-popover.js

index cf6dadf0a5e6e5fd606bf773e05856525e83feb3..128bc54127cd30a09bcbeb5a6f3de2134d36e809 100644 (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 );
\ No newline at end of file
+}( window.jQuery || window.ender );