.removeProp() (since 1.6) removes a property that was set with .prop() on every matched element. It is for custom properties — not HTML attributes and not native form state.
Remember
// Custom property — OK
$("p").prop("luggageCode", 1234);
$("p").removeProp("luggageCode");
// Native form state — do NOT removeProp
// $("input").removeProp("checked"); // avoid
$("input").prop("checked", false); // correct
// App data — prefer .data()
$("#box").data("score", 10);
Set a custom property with .prop(), then remove it when you no longer need it.
Attach a custom property: .prop("myKey", value).
Read it later with .prop("myKey") if needed.
Clean up with .removeProp("myKey").
For natives (checked, disabled), use .prop(name, false) — never .removeProp().
For most app data, prefer .data() over custom .prop() keys.
Piece
Required?
Role
propertyName
Yes
Name of the custom property to remove
Return
—
Same jQuery object (chainable)
Scope
—
Every matched element
After removal
—
.prop(name) → undefined
Pseudocode
Pseudocode
call .removeProp(propertyName)
for each matched element:
delete the JavaScript property named propertyName
return the jQuery collection
// For native form state instead:
// .prop("checked", false)
// .prop("disabled", false)
Reference
Cheat Sheet
Keep these facts handy when cleaning up custom properties.
Topic
Detail
Since
jQuery 1.6
Purpose
Remove properties set via .prop()
Safe on
Custom keys (e.g. luggageCode)
Unsafe on
checked, disabled, selected, …
Native reset
.prop(name, false)
vs .removeAttr()
Property layer vs HTML attribute layer
App data
Prefer .data()
Old IE note
Non-primitive .prop() values needed cleanup
Try it
Live Preview
Set and remove a custom luggageCode on the sample paragraph.
Sample element: the paragraph below. Custom property only — not a native form property.
Sample paragraph
Result
Ready — pick an action and click Run.
Code
jQuery Examples
Short, copy-ready snippets. Use .removeProp() only on custom properties.
Example 1 — Official luggageCode Demo
Set a numeric custom property, show it, then remove it.
jQuery
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")), ". ");
These mistakes cause the most confusion with .removeProp().
native
Never .removeProp("checked")
Same for disabled and selected. Reset with .prop(name, false).
layer
Not a substitute for .removeAttr()
Attributes and properties are different. Removing a property does not remove the HTML attribute.
data
Prefer .data() for app state
jQuery recommends .data() for arbitrary values instead of custom DOM properties.
IE
Old IE + non-primitive .prop()
IE < 9 could leak if object/function props were not cleared before removing the element. Prefer .data() today.
Compatibility
Browser Support
.removeProp() has been part of jQuery since 1.6. Works wherever your loaded jQuery build runs. Prefer current jQuery 3.x+ and .data() for app values.
✓ Stable · jQuery 1.6+
jQuery .removeProp()
Universal across browsers that run your jQuery version. Use only for custom properties — never native form properties.
100%jQuery core
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
.removeProp()Universal
Bottom line: Safe for cleaning custom .prop() keys. For checked/disabled, always use .prop(name, false).
Analysis
Performance Notes
Approach
Cost
Best for
One .removeProp()
Cheap
Cleaning a custom key
.data() / .removeData()
Cheap
Most application state
Many custom props on many nodes
Messy
Prefer a single .data() object
Removal itself is cheap. The bigger cost is confusion — keep custom property use rare and prefer .data() for app metadata.
Remember
Key Takeaways
Role: remove custom properties set with .prop().
Never: call it on checked, disabled, or selected.
Natives: reset with .prop(name, false).
Prefer:.data() for most application values.
One line:.removeProp() cleans custom .prop() keys — never native form properties.
Frequently Asked Questions
.removeProp() removes a property previously set with .prop() on every matched element. Use it for custom properties you added — not for HTML attributes or native form state. Available since jQuery 1.6.
.removeProp() deletes a JavaScript property on the DOM node. .removeAttr() removes an HTML attribute from markup via removeAttribute(). They operate on different layers.
No. Official docs warn that removing native properties can cause unexpected behavior. Reset them with .prop("checked", false) or .prop("disabled", false) instead.
To clean up custom properties you attached with .prop() — for example a temporary flag or code like luggageCode. Prefer .data() for most application values.
Yes. It removes the named property from every element in the collection and returns the jQuery object for chaining.
In IE before version 9, assigning non-primitive values via .prop() could leak memory unless .removeProp() cleared them before the element left the document. Modern code should prefer .data() for arbitrary values.