Code has been added to clipboard!

Make jQuery Remove Property by Using the removeProp Method

Reading time 1 min
Published Jan 23, 2018
Updated Oct 1, 2019

jQuery Remove Property: Main Tips

  • The jQuery .removeProp() removes properties added using the .prop() method.
  • Removing native properties of objects is not recommended: delete only custom ones. Set the native ones to false with .prop() instead.

Using .removeProp()

The .removeProp() method makes jQuery remove property added using .prop() on a selected element. In the example below, you can see jQuery remove CSS property from a <p> element:

$("button").click(() => {
    $("p").prop("secret", "FF0000");

Follow this syntax to make jQuery remove property:


The name of the property is always defined in a string.

Remember: do not make jQuery remove disabled, checked, selected, and other native properties. You won't be able to re-add them again.

Latest Udacity Coupon Found:



Udacity Black Friday Offer

The best time to save on Udacity courses is now - follow this coupon to access a 75% Udacity Black Friday discount & enjoy learning at a very low cost!

Expiration date: 28/01/2021
3176 People Used
Only 97 Left