]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
reordered access of options in tooltip and popover to allow overriding data attrs...
authorJoseph Price <joseph.price@huffingtonpost.com>
Sat, 2 Feb 2013 23:55:18 +0000 (18:55 -0500)
committerJoseph Price <joseph.price@huffingtonpost.com>
Sat, 2 Feb 2013 23:58:56 +0000 (18:58 -0500)
js/bootstrap-popover.js
js/bootstrap-tooltip.js

index 624eb5e31a97dcf361763a1bd0f0aa465da67735..7f6511080397d2747ca906f8accd0e50933584b7 100644 (file)
@@ -58,8 +58,8 @@
         , $e = this.$element
         , o = this.options
 
-      content = $e.attr('data-content')
-        || (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content)
+      content = (typeof o.content == 'function' ? o.content.call($e[0]) :  o.content) ||
+        || $e.attr('data-content')
 
       return content
     }
     return this
   }
 
-}(window.jQuery);
\ No newline at end of file
+}(window.jQuery);
index c23d8267a8e7962bf0f4e0808646e6c2e3b3eaf7..dc06762dd0bad871cdb604ad8942791230b26f1e 100644 (file)
@@ -67,7 +67,7 @@
     }
 
   , getOptions: function (options) {
-      options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
+      options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
 
       if (options.delay && typeof options.delay == 'number') {
         options.delay = {