Just clone() and appendTo() first enter a new list:
$('#old > li').clone().appendTo('#new');
And then change their text() :
$('#new > li').text(function (index, text) { return text + ' at ' + index; });
Working demo: http://jsfiddle.net/vkYUQ/ .
Or, combine the above into one statement:
$('#old > li').clone().text(function (index, text) { return text + ' at ' + index; }).appendTo('#new');
source share