English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

jQuery removeProp() Method

jQuery HTML/CSS Methods

The removeProp() method is used to removeprop()properties set by the method.

Note:Do not use this method to remove HTML native attributes such as id, style, checked, disabled, or selected, etc. This will completely remove the attribute, and once removed, it cannot be added back to the element. Useprop()Set these properties tofalse.

Syntax:

$("selector").removeProp(property)

Example

Set a numeric attribute on a paragraph and then remove it:

$("document").ready(function(){
  $("p").prop("luggageCode", 1234)
  $("p").removeProp("luggageCode")
});
Test and See‹/›

Parameter Value

ParametersDescription
propertySpecify the name of the attribute to be removed

jQuery HTML/CSS Methods