[jQuery] passing data between draggables & droppables

[jQuery] passing data between draggables & droppables


Hi all,
i need some help from the gurus, so i'm asking here ;-)
first of all description of the elements in the page:
1. i have div initialized as draggable like this
        .draggable({
            containment: 'document',
            opacity: '50',
            helper: 'clone',
            start: function () { $.tooltip.block(); },
            stop: function (ev, ui) { $.tooltip.block(); },
            dragdata: [panel_def.id, i] //<< setting custom data
inside options object
        });
2. i have defined many dropzones inside other divs (every one is
initialized as droppable)
        .droppable({
            accept: '.bm_dim_name',
            activeClass: 'bm_droppable_active',
            over: over_handler,
            out: out_handler,
            tolerance: 'pointer',
            drop: drop_handler,
            mydata: [dzip, dzpid, dzisp, dzhdid, dzbt] //<< setting custom
data inside options object
        });
as you can see i'm settting data for draggable and droppable divs. My
problem is that in the older version of the ui.droppable.js i was able
to read draggable element data(ui.draggable.options.dragdata[0])
inside drop callback. Now there is an error because ui.draggable has
no options nor dragdata member. I've compared these two versions of
the ui.droppable.js and there are lot of changes. I can't quite figure
out how to handle or pass custom data(for draggable element) to drop
callback. I need to access draggable element data inside droppable
drop callback :-).
All examples i've gone through are using .attr("memberName", data) to
set or pass data. I don't think this is the best way how to solve
this. Any help or suggestion how to set custom data to these elements
correct/nice/fast way? Thanks.