jquery - How to drag the element and drop into the certain element -
i trying drag , drop
feature in codes.
there @ least 2 tables
in page , want drag table 1 cell
table 2 cell
.
most of table 2
cells empty.
my html
table 1 <table class = 'dragtable'> //bunch of cells... </table> table 2 <table class = 'dragtable'> //bunch of cells... </table>
in codes:
obj = $('.dragtable td'); emptycell = $('.dragtable td:empty'); $(obj).draggable({ cursor:'pointer', snap:emptycell })
my codes above can make user drag cell need make sure user can drop item empty cell not everywhere in page. emptycell
doesn't work in case.
ps: can't change table class
name because affects many other things.
any tips here? lot!
sounds need make empty cells droppable see link below http://jqueryui.com/droppable/
Comments
Post a Comment