UI Sortable receive function not being called
I am trying to grab the id of a sortable div when it's dragged over. I
cannot get the receive function to work:
$("#sortable1, #sortable2").sortable({
receive: function(event,ui) {alert("received "+ $(ui.item).attr
('id')); },
connectWith: ['.connectedSortable']
});
I was able to get it working using the following code, however I could
not get ui.item to work, and when I try $(this) it returns the
sortable element and not the dragged div.
$('#sortable1').bind('sortreceive', function(event, ui) {
var testing=$(this).attr('id');
alert("got one "+testing);
});
For a demo of what I'm trying to do www.cleverasafox.com/testing/firstAttempt.html