i have 2 divs, side side. div on left contains names of applicants fellowship. div on right contains filenames of letters of recommendation applicants. able drag filenames on left div , drop them on name of appropriate applicant. however, filenames won't let dragged outside of div. help? need add parent div name droppable element?
$(".drop_applicant").droppable();
fiddle here: https://jsfiddle.net/150f6yrh/5/
updated jsfiddle
$(".drag_letter").draggable({ cursor: 'move', revert: true, helper: 'clone' }); $(".drop_applicant").droppable({ accept: '.drag_letter', drop: function(event, ui){ alert(ui.draggable.prop("id") + " dropped onto " + $(this).prop("id")); } });
https://jsfiddle.net/150f6yrh/8/
i revert: true
option removed on draggable, :)
hope helps!
Comments
Post a Comment