Skip to content

Commit 6a9cd51

Browse files
committed
Merge pull request twbs#6783 from joprice/popoverOptionsOverride
reordered access of options in tooltip and popover
2 parents 042bb9b + 4b86a91 commit 6a9cd51

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

js/bootstrap-popover.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
, $e = this.$element
5959
, o = this.options
6060

61-
content = $e.attr('data-content')
62-
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
61+
content = (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
62+
|| $e.attr('data-content')
6363

6464
return content
6565
}
@@ -111,4 +111,4 @@
111111
return this
112112
}
113113

114-
}(window.jQuery);
114+
}(window.jQuery);

js/bootstrap-tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
}
6868

6969
, getOptions: function (options) {
70-
options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
70+
options = $.extend({}, $.fn[this.type].defaults, this.$element.data(), options)
7171

7272
if (options.delay && typeof options.delay == 'number') {
7373
options.delay = {

0 commit comments

Comments
 (0)