April 20, 2012
Jquery clone item
Question by Kobjir
I’m studying the interactive-image-vamp-up with jquery css3 and php script from http://tympanus.net/codrops/2010/03/22/interactive-image-vamp-up-with-jquery-css3-and-php/
My question, how to make items clone and get the clone position?
thanks in advance
Answer by Starx
var cloned = $("#itemtoclown").clone(); //clone an element
$("body").append(cloned); //Insert it into DOM
//Access the positions like with
var positions = cloned.position();
console.log(positions.top); //Access the top