mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Draggable: Added disabled option
This commit is contained in:
parent
94e475ba2d
commit
93dfd995df
8
ui/jquery.ui.draggable.js
vendored
8
ui/jquery.ui.draggable.js
vendored
@ -33,7 +33,8 @@ $.widget( "ui.draggable", $.ui.interaction, {
|
||||
appendTo: null,
|
||||
handle: null,
|
||||
helper: false,
|
||||
exclude: "input,textarea,button,select,option"
|
||||
exclude: "input,textarea,button,select,option",
|
||||
disabled: false
|
||||
},
|
||||
|
||||
// dragEl: element being dragged (original or helper)
|
||||
@ -73,6 +74,11 @@ $.widget( "ui.draggable", $.ui.interaction, {
|
||||
|
||||
_start: function( event, pointerPosition ) {
|
||||
var offset;
|
||||
|
||||
// Stop drag if option says disabled
|
||||
if ( this.options.disabled === true ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// The actual dragging element, should always be a jQuery object
|
||||
this.dragEl = this.options.helper ?
|
||||
|
Loading…
Reference in New Issue
Block a user