diff options
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r-- | ui/jquery.ui.mouse.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js index 6abd5ceaf..095a4fad7 100644 --- a/ui/jquery.ui.mouse.js +++ b/ui/jquery.ui.mouse.js @@ -21,7 +21,7 @@ $( document ).mouseup( function() { $.widget("ui.mouse", { version: "@VERSION", options: { - cancel: 'input,textarea,button,select,option', + cancel: "input,textarea,button,select,option", distance: 1, delay: 0 }, @@ -29,12 +29,12 @@ $.widget("ui.mouse", { var that = this; this.element - .bind('mousedown.'+this.widgetName, function(event) { + .bind("mousedown."+this.widgetName, function(event) { return that._mouseDown(event); }) - .bind('click.'+this.widgetName, function(event) { - if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) { - $.removeData(event.target, that.widgetName + '.preventClickEvent'); + .bind("click."+this.widgetName, function(event) { + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { + $.removeData(event.target, that.widgetName + ".preventClickEvent"); event.stopImmediatePropagation(); return false; } @@ -46,11 +46,11 @@ $.widget("ui.mouse", { // TODO: make sure destroying one instance of mouse doesn't mess with // other instances of mouse _mouseDestroy: function() { - this.element.unbind('.'+this.widgetName); + this.element.unbind("."+this.widgetName); if ( this._mouseMoveDelegate ) { $(document) - .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) - .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); } }, @@ -88,8 +88,8 @@ $.widget("ui.mouse", { } // Click event may never have fired (Gecko & Opera) - if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) { - $.removeData(event.target, this.widgetName + '.preventClickEvent'); + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { + $.removeData(event.target, this.widgetName + ".preventClickEvent"); } // these delegates are required to keep context @@ -100,8 +100,8 @@ $.widget("ui.mouse", { return that._mouseUp(event); }; $(document) - .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate) - .bind('mouseup.'+this.widgetName, this._mouseUpDelegate); + .bind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .bind("mouseup."+this.widgetName, this._mouseUpDelegate); event.preventDefault(); @@ -131,14 +131,14 @@ $.widget("ui.mouse", { _mouseUp: function(event) { $(document) - .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate) - .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate); + .unbind("mousemove."+this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup."+this.widgetName, this._mouseUpDelegate); if (this._mouseStarted) { this._mouseStarted = false; if (event.target === this._mouseDownEvent.target) { - $.data(event.target, this.widgetName + '.preventClickEvent', true); + $.data(event.target, this.widgetName + ".preventClickEvent", true); } this._mouseStop(event); |