Using the replaceAll method in jQuery
You can replace one element with another using the equivalent method replaceAll.
Let's take the following paragraphs as an example:
<p class="www">text</p>
<p class="www">text</p>
<p class="www">text</p>
<p>text</p>
Let's replace all paragraphs with class www with a div with text '!!!':
$('<div>!!!</div>').replaceAll('.www');
HTML the code will look like this:
<div>!!!</div>
<div>!!!</div>
<div>!!!</div>
<p>text</p>
Solve the previous problem, but using the replaceAll method.