I want to get the position of an element when it is wrapped.
My code is:
$(document).ready(function(){ $("p").text($("div").position().left); $("p").text($("div").position().top); $("div").draggable(); })
This is only the position when the page loads. I want every time a div is dragged, I can write its position in the p tag.
source share