diff options
| author | fat-kun <[email protected]> | 2013-02-05 21:48:34 -0800 |
|---|---|---|
| committer | fat-kun <[email protected]> | 2013-02-05 21:48:34 -0800 |
| commit | 6a9cd513c02a6c156769d54910f1d3931da3e568 (patch) | |
| tree | 32dd1a1add8fa58e1e89f8d36255a26be6a4f927 | |
| parent | 042bb9b51510573a9a1db6bc66cb16311d0d580b (diff) | |
| parent | 4b86a91e5339600e14e37d3309f2a4bb645cebc5 (diff) | |
| download | bootstrap-6a9cd513c02a6c156769d54910f1d3931da3e568.tar.xz bootstrap-6a9cd513c02a6c156769d54910f1d3931da3e568.zip | |
Merge pull request #6783 from joprice/popoverOptionsOverride
reordered access of options in tooltip and popover
| -rw-r--r-- | js/bootstrap-popover.js | 6 | ||||
| -rw-r--r-- | js/bootstrap-tooltip.js | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/js/bootstrap-popover.js b/js/bootstrap-popover.js index ca0b5eb6b..0e7774bf6 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 9ba2d1214..18e5b54f9 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 = { |
