JQuery : How to enable / disable the text boxes based on radio button selection?


Insurance Name :

Insurance Cost :

Insurance Coverage :

Code Snippet:
<input type="radio" id="id_type_edit" name="type" value="Edit" />Edit
<input type="radio" id="id_type_view" name="type" value="View" />View

Insurance Name : <input type="text" id="id_ins_name" name="ins_name" value="AIG" disabled="disabled" /><br/>
Insurance Cost : <input type="text" id="id_ins_cost" name="ins_cost" value="1000" disabled="disabled" /><br/>
Insurance Coverage : <input type="text" id="id_ins_coverage" name="ins_coverage" value="60%" disabled="disabled" /><br/>


$("#id_type_edit").click(function() {
$("#id_type_view").click(function() {