I have a small problem that I am hoping to get some help with. I have a drag and drop feature that works the way I want it but there is a small problem with it. Once I have dragged an image once, it won’t let me drag the image again. I was wondering if someone could help me with getting the images to be dragged infinitely if possible. Thanks. Below is my code.
$(document).ready(function() {
$("#collectionArea").droppable({
accept: ".selector",
drop: function(event, ui) {
$(this).append($(ui.draggable).clone());
$("#collectionArea .product").addClass("item");
$(".item").removeClass("ui-draggable selector");
$("#cbOptions").show();
$(".item").draggable({
containment: "parent",
grid: [72,72],
});
}
});
$(".selector").draggable({
helper: "clone",
revert: "invalid",
revertDuration: 1000,
opacity: 0.75,
});
});
Comment out this line
//$(“.item”).removeClass(“ui-draggable selector”);
Your removing the selector class, and therefore $(“.selector”).draggable({
no longer has any effect