⊗jqBsNS 20 of 113 menu

jQuery Neighbor Selector

Using jQuery, you can select elements p that are after h3 and are its siblings:

$('h3 ~ p');

This selector can also be used to select p elements that follow h3 directly and are its neighbors:

$('h3 + p');

Obtain and color red all adjacent a that follow h2.

Get and color in red all the paragraphs that immediately follow the paragraphs.

Get and color red all li that immediately follow li with class www.

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