karse23
karse23

Reputation: 4115

Check enabled/disabled status of a draggable element in jQueryUI

I have some elements which are draggable and I'm changing their status like this:

$(obj).draggable("enable");
// and:
$(obj).draggable("disable");

How can I check the current state of a draggable object, ie. if it's enabled or disabled in jQueryUI?

Upvotes: 1

Views: 2449

Answers (2)

Rory McCrossan
Rory McCrossan

Reputation: 337560

You can check if the draggable element is disabled like this:

var isDisabled = $(obj).draggable('option', 'disabled');

Upvotes: 3

Milind Anantwar
Milind Anantwar

Reputation: 82241

var status=$(obj).draggable();

status will current draggable status of obj.

Upvotes: 0

Related Questions