i want to copy a content from one div when clicked and write it to other div:
But when doing this i lost the clicked content from first div:
$(img).click(function(){
var newdiv=this;
$(".second").html(newdiv);
});
i have two divs with class first and second. frist div having images.
why i lost the first div's content or the click element, ie "this"
pls give me a solution