Merge "resourceloader: Make various CSSMin performance optimizations and cleanups"
[lhc/web/wiklou.git] / resources / lib / jquery.ui / jquery.ui.mouse.js
index 250365f..83d8e53 100644 (file)
@@ -29,10 +29,10 @@ $.widget("ui.mouse", {
                var that = this;
 
                this.element
-                       .bind('mousedown.'+this.widgetName, function(event) {
+                       .on('mousedown.'+this.widgetName, function(event) {
                                return that._mouseDown(event);
                        })
-                       .bind('click.'+this.widgetName, function(event) {
+                       .on('click.'+this.widgetName, function(event) {
                                if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
                                        $.removeData(event.target, that.widgetName + '.preventClickEvent');
                                        event.stopImmediatePropagation();
@@ -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.off('.'+this.widgetName);
                if ( this._mouseMoveDelegate ) {
                        $(document)
-                               .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
-                               .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+                               .off('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+                               .off('mouseup.'+this.widgetName, this._mouseUpDelegate);
                }
        },
 
@@ -100,8 +100,8 @@ $.widget("ui.mouse", {
                        return that._mouseUp(event);
                };
                $(document)
-                       .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
-                       .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+                       .on('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+                       .on('mouseup.'+this.widgetName, this._mouseUpDelegate);
 
                event.preventDefault();
 
@@ -131,8 +131,8 @@ $.widget("ui.mouse", {
 
        _mouseUp: function(event) {
                $(document)
-                       .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
-                       .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
+                       .off('mousemove.'+this.widgetName, this._mouseMoveDelegate)
+                       .off('mouseup.'+this.widgetName, this._mouseUpDelegate);
 
                if (this._mouseStarted) {
                        this._mouseStarted = false;