Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Newbie: very basic jquery drag drop
- Ken Ashton
September 2, 2011, 2:32 am
rate this thread
jquery for drag/drop operations. I am trying to implement drag-drop on
a table at the simplest level, but am somehow failing to understand
most of what my Googling has revealed, and most sample show very
I have a table, say 3 x 3, (9 cells with divs in each td). Say, 4 of
the cells have numbers in them (1, 2, 3, 4). I want to drag any cell
with a number in it, to any 'empty' cell, i.e; if the dragged cell is
dropped on an occupied cell, the drag-drop operation gets cancelled
Every example I see seems to talk about moving rows and columns and
doesn't reveal any checking before the drop is completed.
As a newbie to jquery, I hoped to find a very basic example using
perhaps just one table, showing how you can select any 'occupied'
cell, and drag it to any 'unoccupied' cell - but no such luck. Most
examples seem to 'physically' move objects like images and table rows,
but I don'r really need to move anything, i.e; if can simply kill the
source cell content and update the target cell content in a successful
Any advice or sample code will be greatly appreciated.
Many thanks in advance
- » try / catch or INSERT INTO... ON DUPLICATE KEY UPDATE
- — Previous thread in » PHP Scripting Forum