⊗jqDmEIPM 52 of 113 menu

The prepend method for inserting elements in jQuery

jQuery provides 4 methods for inserting elements: append, prepend, after, before.

The prepend method allows you to add text to the beginning of elements. For example, let's say we have a paragraph:

<p>text</p>

We use the prepend method, specifying the text we need inside the tags:

$('p').prepend('<b>!!!</b>');

HTML the code will look like this:

<p><b>!!!</b>text</p>

Inside each h2, insert '!' at the beginning.

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