jquery,jquery-ui,jquery-draggable,jquery-droppable
The two are unrelated. When you mouseup your draggable over a droppable, the first thing that's called is the droppable's accept option (if it's a function, or just matched if a selector). Based on this you'll get two outcomes: If accept matches/returns true, then the drop event is triggered on...
jquery,jquery-ui-draggable,jquery-draggable,jquery-droppable
You were almost there. You need the helper: "clone" attribute indeed. The best way to do this is to create a new clone when the drop event fires using .clone(). Then just initialise it and you're done: $(function() { $(".draggable img").draggable({ revert: "invalid", helper: "clone" }); $("#droppable").droppable({ activeClass: "ui-state-default", hoverClass:...
jquery,jquery-ui,jquery-draggable,jquery-droppable
Instead of simply emptying the droppable target area like the other answers do, I would add a class to the dropped items and then remove them upon a dragstart event of a new draggable. Also, it's nice to add a little fadeOut() event when a new draggable is selected. However,...
javascript,jquery,drag-and-drop,jquery-draggable,jquery-droppable
jQuery ui droppable supports an option called greedy: true which will stop the event propagation. Check this fiddle...
jquery,jquery-ui,jquery-draggable,jquery-droppable
I'll give you a link to Fiddle. I made some updates that might help you but you still have some work to do. I will help you later, if you need that. js $(document).ready(function(){ /* jQuery Droppable */ $(function() { $( ".mn-items .rp-draggable li" ).draggable({ appendTo: "body", helper: "clone" });...
jquery,jquery-ui,jquery-droppable
I saw your fiddle. That's working fine. You are probably unable to really drop your image to the target. Means you need to drag centre of your draggable object to within the bounds of target obeject. And it must work :) ...
jquery,jquery-ui,jquery-draggable,jquery-droppable
You need to change your accept (example http://jsfiddle.net/2n0bevxo/166/): $('#trash').droppable({ accept: "#gallery > li,#trash2 > ul > li", activeClass: "ui-state-highlight", drop: function (event, ui) { deleteImage(ui.draggable); } }); $('#trash2').droppable({ accept: "#gallery > li,#trash > ul > li", activeClass: "ui-state-highlight", drop: function (event, ui) { deleteImage(ui.draggable); } }); Note that I defined...
jquery-sortable,jquery-draggable,jquery-droppable
I figure it out. The working solution: $("ol.sortable").sortable({ // animation on drop onDrop: function (item, targetContainer, _super) { var clonedItem = $('<li/>').css({height: 0}) item.before(clonedItem) clonedItem.animate({'height': item.height()}) item.animate(clonedItem.position(), function () { clonedItem.detach() _super(item) }) } }) I think that removing this fragment: group: 'simple_with_animation', pullPlaceholder: false, from configuration helped....
Ok, the anwer is that i had to bind the droppable event to the class selector $(".droppableitem").droppable({ ...