this._setPositionRelative();
}
if (this.options.addClasses){
- this.element.addClass("ui-draggable");
+ this._addClass( "ui-draggable" );
}
if (this.options.disabled){
- this.element.addClass("ui-draggable-disabled");
+ this._addClass( "ui-draggable-disabled" );
}
this._setHandleClassName();
this.destroyOnClear = true;
return;
}
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
this._removeHandleClassName();
this._mouseDestroy();
},
//Create and append the visible helper
this.helper = this._createHelper(event);
- this.helper.addClass("ui-draggable-dragging");
+ this._addClass( this.helper, "ui-draggable-dragging" );
//Cache the helper size
this._cacheHelperProportions();
_setHandleClassName: function() {
this.handleElement = this.options.handle ?
this.element.find( this.options.handle ) : this.element;
- this.handleElement.addClass( "ui-draggable-handle" );
+ this._addClass( this.handleElement, "ui-draggable-handle" );
},
_removeHandleClassName: function() {
- this.handleElement.removeClass( "ui-draggable-handle" );
+ this._removeClass( this.handleElement, "ui-draggable-handle" );
},
_createHelper: function(event) {
},
_clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
+ this._removeClass( this.helper, "ui-draggable-dragging" );
if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
this.helper.remove();
}