Below is my code (don’t worry about ‘off’, it’s the offset based on the where the user clicks). In the second line I am trying to clone an existing div and then show the cloned copy? But it doesn’t work. However if I remove clone() then the code does work, but of course it simply shows the existing div which isn’t what I need.
var off = $(this).offset();
var div = $('#testtt').clone();
div.css({ position: "absolute", top: off.top, left: off.left });
div.show();
Any tips?
You are cloning the div but not inserting it anywhere in your DOM..
So it is non existent until you do that