Question: I have a bunch of elements on a page which are draggable and determined by:

```
$( ".folder" ).draggable({ revert: true });

```

I need to make one element, which has class `.folder`, not able to be dragged (it's the top folder in a tree).

I tried removing the class ui-draggable from it but that didn't work so I'm guessing the above code overrides it?

Is this possible?

NOTE: I can't simply change the class name as they are also droppable and the top folder in the tree is also droppable.

Answer: 
Try this,

```
$(".folder:not(:first)").draggable({ revert: true });

```

Read **[:not](http://api.jquery.com/not-selector/)** and **[:first](http://api.jquery.com/first-selector/)** **selectors**
just use:

```
$( ".folder" ).draggable("disable"); //or enable

```