Rajamohan Anguchamy Rajamohan Anguchamy - 1 year ago 170
jQuery Question

Getting "removeattr is not a function" exception

I am using jquery-1.7.2.min.js

I'm getting TypeError:

$("#TextBox1").removeattr is not a function [Break On This Error] $("#TextBox1").removeattr("disabled");


Answer Source

The correct function name is removeAttr(), not removeattr:


But starting from jQuery 1.6 it's better to use the .prop() method for setting native attributes such as disabled and checked:

$('#TextBox1').prop('disabled', false);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download