Getting html of dragged element
If I have a few elements with the same class and drag them, then drop
them into a droppable, how can the function for when this drop occurs
get the inner html of the particular element which was being dragged
and dropped?
$(document).ready(function(){
$(".customer").draggable({helper: 'clone'});
$(".drop").droppable({
accept: ".customer",
activeClass: 'droppable-active',
hoverClass: 'droppable-hover',
drop: function(ev, ui) {
$(this).append($('.customer').html());
}
});
});
This will only give the first element with the 'customer' class
regardless of which one was dragged.
Any ideas? Thanks :)