aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Price <[email protected]>2013-02-02 18:55:18 -0500
committerJoseph Price <[email protected]>2013-02-02 18:58:56 -0500
commit1fe4ed882341af29a3b709c06642e0dbb556560f (patch)
treed8d889332a2152ddadd7520b481275d729bbdc3f
parentdbe8aed76ed556a082a8dd99dbcc786e4d7ea8df (diff)
downloadbootstrap-1fe4ed882341af29a3b709c06642e0dbb556560f.tar.xz
bootstrap-1fe4ed882341af29a3b709c06642e0dbb556560f.zip
reordered access of options in tooltip and popover to allow overriding data attrs from js
-rw-r--r--js/bootstrap-popover.js6
-rw-r--r--js/bootstrap-tooltip.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js
index 624eb5e31..7f6511080 100644
--- a/js/bootstrap-popover.js
+++ b/js/bootstrap-popover.js
@@ -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
}
@@ -111,4 +111,4 @@
return this
}
-}(window.jQuery); \ No newline at end of file
+}(window.jQuery);
diff --git a/js/bootstrap-tooltip.js b/js/bootstrap-tooltip.js
index c23d8267a..dc06762dd 100644
--- a/js/bootstrap-tooltip.js
+++ b/js/bootstrap-tooltip.js
@@ -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 = {