Here's the basics of what you need to do.  You may need to tweak it
depending on the offset parents and whether you care about position in
the DOM.

drop: function(event, ui) {
        var offset = $(this).offset();
        ui.draggable.css({
                position: 'absolute',
                top: offset.top,
                left: offset.left
        });
}

On Jun 9, 10:13 am, "[email protected]" <[email protected]> wrote:
> Hey Scott, I'm a friend of Perfektus'. We're both working on the
> website.
>
> Yes, we're looking for the dropped draggable to fit exactly on top of
> the droppable, like any other inventory in many Roleplaying Games. Say
> we want to put our equipped weapon in to our bagpack, slot 2. We want
> the weapon to automatically fit the slot that we drop it on :).
>
> Regards.
> Christian.
>
> On Jun 9, 3:22 pm, Scott González <[email protected]> wrote:
>
> > What exactly do you mean by "i want the drag object to fit my drop
> > object"?  Do you mean after you drop the draggable you want the
> > draggable to be positioned exactly on top of the droppable?
>
> > On Jun 9, 5:09 am, Perfektus <[email protected]> wrote:
>
> > > Hallow guys..
>
> > > I have recently installed Drag And Drop, and its great, but i stumbled
> > > into a problem.
> > > Okay the deal is, i got 12 drop divs, and atm 7 drag object, they are
> > > of same size.
> > > But i want the drag object to fit my drop object on drop, i have been
> > > trying everything for MANY hours, but with no luck!
>
> > > I am new at Jquery, so might be something i missed, been playing alot
> > > with position but won't work!
>
> > > If you need to see the project you can check my site 
> > > onhttp://www.patterdale.dk/paradise/inventory.php
> > > Tho it require a login.
>
> > > I really hope for some help guys, i'm really stuck with this!
> > > Share your wisdom with me :)
>
> > > Regards.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to