0

I have a raw JavaScript drag function. When I view the dynamic source in Firebug whilst dragging an element, I see the values for style - top and left changing.

When I try this in jQuery, using the draggable method, there are no values for top and left in the source.

Why is it like this? ...and how can I get the actual last position of an element using jQuery and store it and then use it to set the position as the element is being dropped in a droppable zone?

Also, when I use droppable method: the drop area is activated by the element you want to drop covering the drop area, and not the position of the mouse being over the drop area. Can this be fixed?

user1121487
  • 2,662
  • 8
  • 42
  • 63

1 Answers1

0

I'm not very sure what you're doing, but this might help -

http://api.jquery.com/offset/

This gets the position relative to the document.

Cheers.

edit: what Alex said!

Kyle Yeo
  • 2,270
  • 5
  • 31
  • 53