⊗jqDmMAch 40 of 113 menu

Changing Multiple Attribute Properties in jQuery

Similar to the attr method, we can change the values ​​of several properties at once; to do this, they need to be passed as an object.

Let's say we have the following checkbox:

<input type="checkbox" class="aaa" id="test" />

Let's change the properties for className and disabled at the same time.

$("#test").prop({ className: 'bbb', disabled: 'true' });

HTML the code will look like this:

<input type="checkbox" class="bbb" id="test" disabled>

Also similar to the attr method, we can apply a function to each property.

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