I am sure that this was answered, but I can not find an example that would be appropriate for my situation. I have a list of images that you can drag and drop. I also have a div (id = "dropZone") that is set to droppable and sortable. I would like to run a function when the images are dragged and divided by div, but not when things are dropped onto the div from sorting. Here is what I tried:
stop: function() { $('#dropZone').prepend('<img src"img.png" />'); }
I added this to the dropdowns, however it will work even if they are dropped outside of droppable.
drop: function() { $('#dropZone').prepend('<img src="img.png" />'); }
Then I tried to add this to my droppable, but this adds the image both when dragging it and when sorting it.
Does anyone know what I need to do?
source
share