jQuery addClass example

Change class name on click in jQuery

HTML

<form id="form1">
			<table border="0px">
				<tr>
					<td>Name</td>
					<td><input  type="text" id="Name" style="width:200px;" value="Testing"/></td>
				</tr>
				<tr>
					<td>Age</td>
					<td><input type="text" id="Age" style="width:50px;" value="25"/></td>
				</tr>				
				<tr>
					<td>Address</td>
					<td><textarea   id="Address" cols="40" rows="5">Some Where in World</textarea></td>
				</tr>
        
        <tr>
					<td>Gender</td>
					<td>
					   <input type="radio" name="gender" value="male" checked> Male<br/>
             <input type="radio" name="gender" value="female"> Female<br/>
					</td>
				</tr>

			</table>
		</form>

JavaScript

$(document).ready(function(){
				/*Disable all input type="text" box*/
				$('#form1 input[type="text"]').prop("disabled", true);
				/*Disable textarea using id */
				$('#form1 #Address').prop("disabled", true);
        /*Disable radio button */
        $("#form1 input:radio").attr("disabled",true);
        
			});