Hi Richard, Many thanks for the response. Yep - you're right. This jQuery really is clever.
For anyone else: addProduct(ui.draggable.attr('id')); :-) Cheers, - JB On Oct 12, 11:23 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote: > That second parameter passed to the drop callback function, 'ui', has a > draggable property. That's a jQuery object that contains the draggable > element being dropped. Every jQuery UI callback has a ui hash passed as the > 2nd parameter. The properties are specific to the plugin, and in some cases > the callback. See the jQuery UI Docs for specifics. For example, here you > can find the list of properties for droppable's ui > hash:http://docs.jquery.com/UI/Droppables/droppable#options > > Also note: there is a dedicated mailing list for jQuery UI questions: > > http://groups.google.com/group/jquery-ui > > Welcome! :) > > - Richard > > On Sat, Oct 11, 2008 at 6:58 PM, Jub <[EMAIL PROTECTED]> wrote: > > > 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