Reputation: 139872
$("id").clone()
then put the jQuery object into a div#target
how to do that?
Upvotes: 0
Views: 225
Reputation: 19241
$('#id').clone().appendTo('div#target');
Reputation: 186562
$('#id').clone().attr('id', 'foo').appendTo('#target') // the .attr to prevent duplicate ids.
Upvotes: 2