Skip to content

Commit

Permalink
reordered access of options in tooltip and popover to allow overridin…
Browse files Browse the repository at this point in the history
…g data attrs from js
  • Loading branch information
Joseph Price committed Feb 2, 2013
1 parent dbe8aed commit 1fe4ed8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions js/bootstrap-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -111,4 +111,4 @@
return this
}

}(window.jQuery);
}(window.jQuery);
2 changes: 1 addition & 1 deletion js/bootstrap-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 1fe4ed8

Please sign in to comment.