Inside the drop callback, you can get the id of the draggable by
var dragId = ui.draggable.attr('id');
and the id of the droppable by
vat dropId = $(this).attr('id');
- Richard
On Mon, Aug 17, 2009 at 1:26 PM, Krish <[email protected]> wrote:
>
> Hi All,
>
> In my project, I have assigned with the new task in which, I have a
> div with draggable elements. And multiple droppable divs(accepts the
> draggable elements).
>
> I have to identify to which droppable div, an element has been dragged
> into.
>
> there is no direct property to find the droppable's ID value.
>
> Here is my HTML code :
>
> <div id="div_container">
> <div id="div_blocks" class="secondlevelDIV">
> <?php
> for($i=0;$i <= count($this->Count) ;$i++) {
> ?>
> <div id="droppableDIV_<?=$i+1?>"
> class="droppableDIV"
> onmouseover="dragItems.getID(this);"></div> <br>
> <?php
> }
> ?>
> </div>
> <div id="div_draggables" class="draggables">
> <div id="div_types" >
> <div>
> <?php
> foreach
> ($this->Types as $k=>$v) {
> echo "<div
> id=$v class='draggableCONT'>" .$v."</div>" ;
> }
> ?>
> </div>
> </div>
> </div>
> </div>
>
>
>
> I am able to get the currently dragged elements id by =>
> ui.draggable.context.getAttribute('id');
> is there any similar way to get the droppable container's(div) ID?
>
> any help would be highly appreciated.
>
>
> Thanks all,
> Krish
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---