How to disable an input with jQuery Validation Plugin

Posted by Eelke on Stack Overflow See other posts from Stack Overflow or by Eelke
Published on 2010-06-17T23:24:35Z Indexed on 2010/06/17 23:33 UTC
Read the original article Hit count: 140

Filed under:
|
|

This should be really simple but I can't get it to work, how do I disable and add a class to an input? Let's say I've got an input field with id = name, this is how far I got,

$("input#name").attr("disabled");

What am I doing wrong here? Any help would be greatly appreciated, thanks in advance!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery