Commit 01e0f8c6 authored by fat's avatar fat
Browse files

only pass unique options through to child nodes in tooltips

parent cf998040
Showing with 30 additions and 4 deletions
+30 -4
...@@ -80,7 +80,16 @@ ...@@ -80,7 +80,16 @@
} }
, enter: function (e) { , 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() if (!self.options.delay || !self.options.delay.show) return self.show()
......
...@@ -1125,7 +1125,16 @@ ...@@ -1125,7 +1125,16 @@
} }
, enter: function (e) { , 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() if (!self.options.delay || !self.options.delay.show) return self.show()
......
This diff is collapsed.
...@@ -80,7 +80,15 @@ ...@@ -80,7 +80,15 @@
} }
, enter: function (e) { , 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() if (!self.options.delay || !self.options.delay.show) return self.show()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment