Skip to content
Related Articles

Related Articles

Improve Article

jQuery | removeProp() with Examples

  • Last Updated : 13 Feb, 2019

The removeProp() method is an inbuilt method in jQuery which is used to remove the property set by the prop() method. The prop() method is used to add property to a selected element.


Hey geek! The constant emerging technologies in the world of web development always keeps the excitement for this subject through the roof. But before you tackle the big projects, we suggest you start by learning the basics. Kickstart your web development journey by learning JS concepts with our JavaScript Course. Now at it's lowest price ever!


Parameter: This method accepts single parameter property which is mandatory. It is used to specify the name of the property which needs to remove.

Return Value: This method returns the selected element with the specified property removed.

Below example illustrates the removeProp() method in jQuery:


<!DOCTYPE html>
        <title>The removeProp Method</title>
        <script src=
        <!-- jQuery code to show the working of this method -->
            $(document).ready(function() {
                $("button").click(function() {
                    var $GFG = $("div");
                    $GFG.prop("color", "green");
                    $GFG.append("The value of color: "
                                     + $GFG.prop("color"));
                    $GFG.append("<br>The value of color after removeProp: " 
                                            + $GFG.prop("color") + "<br>");
            div {
                width: 400px;
                min-height: 60px;
                padding: 15px;
                border: 2px solid green;
                margin-bottom: 10px;
        <!-- click on this button -->
        <button>Click Here!</button>

removeprop method

My Personal Notes arrow_drop_up
Recommended Articles
Page :