Example 1 — Official luggageCode Demo
Set a numeric custom property, show it, then remove it.
var para = $("p");
para
.prop("luggageCode", 1234)
.append("The secret luggage code is: ", String(para.prop("luggageCode")), ". ")
.removeProp("luggageCode")
.append("Now the secret luggage code is: ", String(para.prop("luggageCode")), ". "); How It Works
- Set.
.prop("luggageCode", 1234)adds a custom property. - Read. Getter returns
1234. - Remove.
.removeProp()deletes that key.

