stuxbrux
stuxbrux

Reputation: 107

drag and drop without moving the element

Hi am using drag and drop from Jquery, and what I want to try and simulate is the drag and drop except during the drag motion I don't want the element to actually move from its place.

In the example here : http://jsfiddle.net/2LN5G/ when you drag the "Drag me to target" it is moved from the possition and reverts back when it is dropped. I want to still show "Drag me to target in the current position and still show the "Drag me to target" moving with the cursor. Is this possible ?

Upvotes: 5

Views: 2653

Answers (1)

simshaun
simshaun

Reputation: 21466

Take a look at the visual feedback example on jQueryUI.com.

Basically, you want to specify the helper option when calling the .draggable() method.

$(".draggable").draggable({
  helper: "clone"
});

Upvotes: 9

Related Questions