$('#drop_area').droppable({
accept: '.draggable',
drop: on_element_drop
});
function on_element_drop(event, ui){
}
<div class="draggable">
<img src="test.png" alt="3">
</div>
I'm trying to figure out how I can get the 'alt' property of the image in this draggable div from the 'ui' argument passed to 'on_element_drop.' Anyone know how to do this?
The closest I seem to get is:
ui.helper.context.children[0].attr('alt');
however this doesn't work.
ui.draggable.find("img").attr("alt")