burak emre
burak emre

Reputation: 1591

jquery ui draggable handler for moving object

I'm using jQuery UI draggable and I couldn't find any option for handler for moving object. There is only one option that is for placeholder but it is not working for the moving object. It can be with drag event, but I'm looking for a more powerful way. Is there another way to do it?

An example screenshot from Google Music: (Windows don't show the cursor in print screen, so I had to sketch)

google music draggable

Upvotes: 0

Views: 585

Answers (1)

Stéphane Bebrone
Stéphane Bebrone

Reputation: 2763

You can use the helper option to change the visual feedback:

Provide feedback to users as they drag an object in the form of a helper. The helper option accepts the values 'original' (the draggable object moves with the cursor), 'clone' (a duplicate of the draggable moves with the cursor), or a function that returns a DOM element (that element is shown near the cursor during drag). Control the helper's transparency with the opacity option.

Upvotes: 1

Related Questions