⊗jqSeEC 91 of 113 menu

Cloning Elements in jQuery

The clone method creates deep copies of selected page elements and returns them as a jQuery object.

Let's look at how this method works using a paragraph as an example:

<p class="www">text</p>

After the paragraph, we insert another one of the same, using the method insertAfter:

$('.www').clone().insertAfter('.www');

Clone the div with class www, color it red, give it text '???' and paste it before this div.

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