I have a function that validates an input field if a checkbox is checked:
jQuery("input[type='checkbox'][value='Internet Search']").click(function(){
if (jQuery("input[type='checkbox'][value='Internet Search']").prop('checked'))
{
validatetext("input[name='internetSearch']", 4, 12, "input[type='checkbox'][value='Internet Search']");
} else {
errors[12] = true;
checkInput("input[name='internetSearch']",errors[12]);
}
});
What I'd like to do is add a read only attribute to the if/else statement. How would this be written?