How to get and set the position of an element with the jQuery .offset method?
.offset
Let\'s say I have a div layer1 and another layer2
layer1
layer2
It's doable but you have to know that using offset() sets the position of the element relative to the document:
offset()
$('.layer1').offset( $('.layer2').offset() );