Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

drag and drop without moving the element

Tags:

jquery-ui

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 ?

like image 870
stuxbrux Avatar asked Jan 08 '11 00:01

stuxbrux


1 Answers

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"
});
like image 98
simshaun Avatar answered Sep 21 '22 00:09

simshaun