jQuery removeProp() method

The jQuery removeClass() method remove a property for the set of matched elements.

Source Code

<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
   <style>
 	 .highlight { border : 2px solid #1E8CBE; }
  </style>
</head>
<body>
  
<input id="check1" type="checkbox" checked="checked">
<label for="check1">Checkbox</label>

<button>Click Here</button>

  
<script>
jQuery("button").click(function () {
	jQuery("#check1").removeProp("checked");
});
</script>
</body>
</html>

Demo

Following example remove the “checked” property of the checkbox (with id=”check1″).


,

No comments yet.

Leave a Reply