I have something here that cannot seem to help me disable the submit button. any ideas?
<
You should be checking for the attribute checked
and not the method.
Updated fiddle : http://jsfiddle.net/8YBu5/7/
$('#checky').click(function(){
if($(this).attr('checked') == false){
$('#postme').attr("disabled","disabled");
} else {
$('#postme').removeAttr('disabled');
}
});
EDIT
Remember that this code needs to be wrapped inside $(document).ready()
or put at the bottom of your html code, otherwise your JS will bind itself to DOM elements that have not been loaded yet and will fail.
Wrapping it in .ready()
This code can be put anywhere in the document and will only trigger once the DOM is ready so you don't have to worry about premature triggers.
Putting it at the bottom of your document