add event to divobjects and get position

add event to divobjects and get position

hello,

i have created a dynamic page that loads x number of div objects that are draggable.
i want to add a mouseup event on theese and get the position of the div that i clicked
i also need to get the text from the label object in the div

i want this event to work on them all dynamically


the div structure

<div root, class=rootdiv>
<div header>
<div title>
<label><button>
</div>
</div>
<div contents>
<object>
</div>
</div>


my script so far, but i haven't gotten this to work


            $('.rootdiv').mouseup(function () {
                var page = $(this).next('label').text();

                var left = $(this).position().left;
                var top = $(this).position().top;
                alert(page, left, top);
                //                setPosition(page, left, top);
            });

does any1 know of a sollution.