jQuery removeProp() Method

Last Updated:

jQuery removeProp() Method

The jQuery removeProp() method removes a property for the set of matched elements.

Example

HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> </head> <body> <h1>jQuery removeProp() Method</h1> <p>My Name is <span></span>.</p> <script> $(document).ready(function(){ $("span").prop("name", "Jade"); $("span").removeProp("name"); $("span").text($("span").prop("name")); }); </script> </body> </html>

Syntax

$(selector).removeProp(property);

Parameter Values

Value Type Explanation
property Required Specifies the name of the property to remove

Browser Support

Devicedesktopmobile
Browsergoogle chromesafarifirefoxinternet Exploreredgeoperagoogle chromesafarifirefoxedgeoperaandroid webviewsamsung internet
removeProp()YesYesYesYesYesYesYesYesYesYesYesYesYes

Share this Page

Meet the Author