jquery ui - message in empty <div> to drag -
i working on drag , drop tool using jquery ui's sortable widget.
i'd add message empty div can dragged into, like: "drag here". i'd remove message in div. there times when page loads in div, can't on action, onload needs check too.
how go it?
here's code:
$("#divfrom, #divto").sortable({ connectwith: '.connectedsortable' }).disableselection();
you should able set draggable
, , droppable
, tap droppable
's drop
event handler, fired when item dropped:
$("#target").droppable({ drop: function() { // empty droppable div: $(".message").remove(); } });
demo here: http://jsfiddle.net/andrewwhitaker/rugjf/2/
as doing similar on load, if provided markup make providing solution little easier (is there specific element inside droppable
div
check for?)
hope helps.
Comments
Post a Comment