Skip to content

Commit

Permalink
only pass unique options through to child nodes in tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
fat committed Mar 1, 2013
1 parent cf99804 commit 01e0f8c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
11 changes: 10 additions & 1 deletion docs/assets/js/bootstrap-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,16 @@
}

, enter: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
var defaults = $.fn[this.type].defaults
, options = {}
, self


this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
}, this)

self = $(e.currentTarget)[this.type](options).data(this.type)

if (!self.options.delay || !self.options.delay.show) return self.show()

Expand Down
11 changes: 10 additions & 1 deletion docs/assets/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,16 @@
}

, enter: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
var defaults = $.fn[this.type].defaults
, options = {}
, self


this._options && $.each(this._options, function (key, value) {
if (defaults[key] != value) options[key] = value
}, this)

self = $(e.currentTarget)[this.type](options).data(this.type)

if (!self.options.delay || !self.options.delay.show) return self.show()

Expand Down
Loading

0 comments on commit 01e0f8c

Please sign in to comment.