Remove a property for the set of matched elements.

.removeProp(propertyName)🡢 jQuery

propertyName StringThe name of the property to remove.

The .removeProp() method removes properties set by the .prop() method.

Note:This method should not be used to remove built-in (native) properties such as "checked", "disabled", "selected", or others. This can lead to unexpected behavior.

It's almost always better to use .prop() to set native properties to false instead of removing them.

Set a numeric property on a paragraph and then remove it.

img {
  padding: 10px;
div {
  color: red;
  font-size: 24px;
para = $("p");
  .prop("luggageCode", 1234)
    "The secret luggage code is: ",
    ". "
    "Now the secret luggage code is: ",
    ". "

Looking for a Web Developer?


Hi! I'm Basti, author of this site. If you are looking for a web developer with 15+ years of experience, holla at me!

Be it the good 'ol jQuery, vanilla JS or modern frameworks like Vue and Svelte, front- or backend, I can help you.

Just write me at jobs@jqapi.com :)