aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-02-12 09:14:36 -0500
committerScott González <scott.gonzalez@gmail.com>2012-02-12 09:14:36 -0500
commit4f909c50bad9cbdf4789d272ada71c51fa1226d3 (patch)
tree754a41f9ad982dcd9be686521fb18f8d030c269b /tests
parent609243b21d2530ecd5e8e19e99951decc8587285 (diff)
downloadjquery-ui-4f909c50bad9cbdf4789d272ada71c51fa1226d3.tar.gz
jquery-ui-4f909c50bad9cbdf4789d272ada71c51fa1226d3.zip
Demos, Tests: Remove use 'that' instead of 'self'. Partial fix for #5404 - remove uses of 'var self = this;'
Diffstat (limited to 'tests')
-rw-r--r--tests/jquery.simulate.js3
-rw-r--r--tests/visual/menu/drilldown.html14
2 files changed, 8 insertions, 9 deletions
diff --git a/tests/jquery.simulate.js b/tests/jquery.simulate.js
index a8740e6b8..43614dd0a 100644
--- a/tests/jquery.simulate.js
+++ b/tests/jquery.simulate.js
@@ -157,8 +157,7 @@ $.extend( $.simulate.prototype, {
},
drag: function( el ) {
- var self = this,
- center = this.findCenter(this.target),
+ var center = this.findCenter(this.target),
options = this.options,
x = Math.floor( center.x ),
y = Math.floor( center.y ),
diff --git a/tests/visual/menu/drilldown.html b/tests/visual/menu/drilldown.html
index a2ae9e88f..781f5d88a 100644
--- a/tests/visual/menu/drilldown.html
+++ b/tests/visual/menu/drilldown.html
@@ -21,7 +21,7 @@
$.widget("ui.drilldown", {
_init: function() {
- var self = this;
+ var that = this;
this.active = this.element.find(">ul").attr("tabindex", 0);
// hide submenus and create indicator icons
@@ -31,18 +31,18 @@
// disable built-in key handling
input: $(),
focus: function(event, ui) {
- self.activeItem = ui.item;
+ that.activeItem = ui.item;
},
select: function(event, ui) {
- if (this != self.active[0]) {
+ if (this != that.active[0]) {
return;
}
var nested = $(">ul", ui.item);
if (nested.length) {
- self._open(nested);
+ that._open(nested);
} else {
- self.element.find("h3").text(ui.item.text());
- self.options.select.apply(this, arguments);
+ that.element.find("h3").text(ui.item.text());
+ that.options.select.apply(this, arguments);
}
}
});
@@ -52,7 +52,7 @@
primary: "ui-icon-carat-1-w"
}
}).click(function() {
- self.up();
+ that.up();
return false;
}).hide();
},