Clone, Wrap and Replace
clone copies elements, wrap puts a wrapper around them and replaceWith swaps them for something else.
Example
const $c = $('#row').clone();
$('p').wrap('<div class="box"></div>');
$('#old').replaceWith('<p>New</p>');Exercise
Copy an element.
$('#r').()
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.