diff options
author | Richard Worth <rdworth@gmail.com> | 2008-05-27 02:35:36 +0000 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2008-05-27 02:35:36 +0000 |
commit | 8f117475b87d653f857cfc004c145381f6235a52 (patch) | |
tree | a86aae97ca46ce1bc6e2fa4ff72f937b41c70d5f /ui/tests/ui.testmouse.js | |
parent | 9a671aef8f076bf52103e1afa13191a2a94741a5 (diff) | |
download | jquery-ui-8f117475b87d653f857cfc004c145381f6235a52.tar.gz jquery-ui-8f117475b87d653f857cfc004c145381f6235a52.zip |
autodrag - Added beginning of selectables tests
Diffstat (limited to 'ui/tests/ui.testmouse.js')
-rw-r--r-- | ui/tests/ui.testmouse.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ui/tests/ui.testmouse.js b/ui/tests/ui.testmouse.js index d629e4bff..5b73ab013 100644 --- a/ui/tests/ui.testmouse.js +++ b/ui/tests/ui.testmouse.js @@ -11,21 +11,21 @@ var mouseX = 0;
var mouseY = 0;
-
+
+ $(function() {
+ $(document).mousemove(function(e) {
+ if (e.isTrusted !== false) {
+ mouseX = e.pageX;
+ mouseY = e.pageY;
+ }
+ });
+ });
+
$.widget("ui.testMouse", {
trackMouse: function() {},
init: function() {
- var self = this;
- this.trackMouse = function(e) {
- if (e.isTrusted !== false) {
- mouseX = e.pageX;
- mouseY = e.pageY;
- }
- }
- $(document).bind("mousemove", this.trackMouse);
},
destroy: function() {
- $(document).unbind("mousemove", this.trackMouse);
},
center: function(offset) {
var o = this.element.offset();
|