[jQuery] Newbie: Getting Draggable ID in Droppable function
Hi gang,
New-ish to JQuery, and I have teething problem. I have a whole bunch
of draggable items (identified by class="box"), all of which have
unique IDs. When they're dragged onto the droppable, I need to get the
ID for that unique draggable.
Specifically:
$(document).ready(function(){
$(".box").draggable({helper: 'clone'});
$("#cart").droppable({
...
...
...
drop: function(ev, ui) {
addProduct(I-WANT-TO-GET-THE-DRAGGABLE-ID-HERE);
}
});
Any suggestions on this most appreciated. :-)
Cheers,
- JB