jQuery offset combined with jQuery UI doesn't update on drag
- by Constructor
I need to get the offset of the element that is being dragged and I use:
$(function(){
$(".draggable").draggable({
stop: function(){
var offset = $("#boxone").offset();
alert(offset.left);
}
});
});
the element is positioned absolute and has a CSS of:
left:100px;
that is the value I get on the alert when I drag the element (even multiple times).
What I want is to get it to alert the current offset (if I drag in 200px to the right it should say 300)