Home
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <style> .test { color: green; font-size: 20px; } </style> <script> $(document).ready(function () { $("button").click(function () { $("div").removeProp('style'); // removes style attribute $(".test").removeProp('class'); // removes class attribute $("input[type='text']").removeProp('disabled');// removes disabled attribute }); }); </script> </head> <body> <h1>jQuery Manipulation Methods: removeProp()</h1> <div style="color:red;font-size:25px;">This is a div tag</div> <div class="test"> <p>This is a paragraph</p> </div> <input type="text" value="Testing removeProp()" disabled /><br/><br/> <button>Click Me to test removeProp()</button> </body> </html>
Result: