jquery drag item to canvas and drag it back to list -


i'm using jquery drag <li> item canvas , work fine. when try drag item list, not work. can me please?

here source:

$("#group1").sortable({     revert: true });            $('li[id^="item"]').draggable({     // connecttosortable: "#group1",      helper: function(){         $copy = $(this).clone();         return $copy;      },      start: function(event, ui) {         dropped = false;         $(this).addclass("hide");     },     stop: function(event, ui) {         if (dropped==true) {             $(this).remove();         } else {             dropped=false             $(this).removeclass("hide");         }         $('#'+$(this).attr('id')).draggable({             connecttosortable: "#group1",             //helper: "clone",             revert: "invalid"          });     } });   var dropped = false; $( "#canvas" ).droppable({                   drop: function(event, ui) {         dropped = true;         $.ui.ddmanager.current.cancelhelperremoval = true;         //ui.helper.appendto(this);     } });  

a canvas chunk of pixels. not "container" element other nodes.

if @ dom tree more in code after dragging element, you'll find they've not been added canvas @ all.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -