⊗jqDmRaM 61 of 113 menu

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.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline