This should be an easy one, but through all the research I've done on the net I just can't seem to find the solution!
I've currently got a sortable list using .sortable, and then a .bind event with a double click, with the bind event as follows:
$("#controlContainer").sortable({
blah blah
})
.bind('dblclick', function(event) {
alert($(event.eventData).attr('id'));
});
My issue is the fact that the above doesn't work, I need to get the ID of whichever element has been double clicked, but can't find a way of accessing it.
Anyone with any solution? Would be greatly appreciated.
Try changing event.eventData
to event.target
.
.bind('dblclick', function(event) {
alert($(event.target).attr('id'));
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With