I'm trying to disable textbox using jquery like below but its not working
$("#docNumber").attr("disabled","disabled");
also tried beow but no luck
$("#docNumber").attr("disabled",true);
Below is code http://jsfiddle.net/sukumar/j6jZA/2/
I'm trying to disable textbox using jquery like below but its not working
$("#docNumber").attr("disabled","disabled");
also tried beow but no luck
$("#docNumber").attr("disabled",true);
Below is code http://jsfiddle.net/sukumar/j6jZA/2/
This issue is on your first line:
$(document).ready(
This must be:
$(document).ready(function(){
And then finish off with:
});
See this update, works fine: http://jsfiddle.net/j6jZA/7/
You are not using .ready correctly in your fiddle --> $(document).ready(
$(document).ready(function(){
// disable the docNumber textbox when page is loaded
$("#docNumber").prop("disabled",true);
});
Working demo --> http://jsfiddle.net/j6jZA/5/