+1  A: 

Use true instead of disabled:

$("input").attr("disabled", true);

Working example: http://jsfiddle.net/bEC8L/ (input is set to disable after 5 seconds)

jQuery sets properties instead of attributes if the given attribute is actually a property name, and "disabled" isn't a valid value for the disabled property.

Andy E
I tried using true and it's not working, I used the code you gived me and it enables all the inputs instead of disabling them.
andreeib
@andreeib: Did you check the working example via the link I posted? I just tested it in several browsers. Your issue must be elsewhere.
Andy E
Yes I checked your example and it's working, I used the console and I disabled the inputs on this stackoverflow page but when I want to disable the inputs on my page I just end up enabling them all.Thank's for your quick answer.
andreeib
@andreeib: Were you copy/pasting directly? Make sure you're not passing a string as the second argument to `.attr()`, it has to be a boolean (`true`).
Andy E
+1  A: 

This should do the trick:

Disable: $('#the-field-id').attr('disabled', true);

Enable: $('#the-field-id').removeAttr('disabled');

Zuul
Yes your code should work, but it's not.
andreeib
At your input field, You must set an ID or class to call that action![ $('#something') -> call ID "something" ] [ $('.something') -> call class "something" ] [ # -> for ID ] [ . -> for Class ]
Zuul
A: 

Your piece of code seems ok, so the problem must be coming from another part of code. Put a break on the line where you disable and then run step by step.

Psyconn