Skip to content
Clone the position of another element easily.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
README.md
jquery.clonePosition.js
jquery_clone_position_test.html

README.md

jQuery.clonePosition.js

What is it for?

Make one HTML element match the position and size of another.

jQuery.clonePosition(element, [options])

Copies height/width and left/top of element.

$('#myDiv').clonePosition('#anotherDiv');

Also accepts options object with the following parameters:

{
  cloneWidth: boolean,
  cloneHeight: boolean,
  offsetLeft: integer,
  offsetTop: integer
}

Questions and feedback

gary@talkerapp.com
@xutopia
Something went wrong with that request. Please try again.