Denis
Denis

Reputation: 223

Draggable <td> content using jQuery

I would like to use jQuery and its drag-and-drop function, such as: http://jqueryui.com/demos/draggable/

In my case, I would like to enable drag-and-droping on <td> content of an HTML table. For instance with a table of 20x20, in order to move a <img /> tag from a cell to an other cell.

Is that hard to do? I don't see any example after searches. If you're got one or if you can show me how to process, I will be cool!

Upvotes: 6

Views: 3396

Answers (2)

dgo
dgo

Reputation: 3937

Try using jQuery.ui.sortable. That should allow for drag and drop within the table.

Upvotes: 2

El Amor Zeewon
El Amor Zeewon

Reputation: 108

I think you can use a div inside the .so that yo can drag the div and drop it where you want.

Upvotes: 0

Related Questions