Click here to Skip to main content
15,887,946 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i want to drag my this code,
For<input type="hidden"id="hd1" value='for (int i=*; i<*; i++)'/>


to the target area,

data-options="
accept: '.dragitem',
onDragEnter:function(e,source){
$(this).html('enter');
},
onDragLeave: function(e,source){
$(this).html('leave');
},
onDrop: function(e,source){
$(this).html($(source).find('input').val());
}
">


the problem occurs when i select the next code, the previous code disappears...
else<input type="hidden" id="hd2" value='else{}'/>


please tell me how to let my codes stay on the target box right after one another... i am making a project that drags and drops the iteration structures (if, else) for user convenience... i am using Jquery UI for drag and drop...
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900