jQuery .prop("disabled", false) not working in Chrome

user994461 picture user994461 · Feb 11, 2012 · Viewed 27.7k times · Source

having problems with .prop("disabled", false) it's works fine in opera and firefox but IE and chrome i can't get it to work..

Actualy it's a invination form and im make send button like this

<input id="sendInvite" class="mail_send" disabled="disabled" type="button" name="invite" value="Send">

and here is css

.mail_send[disabled="disabled"] {background-color:#343434; color:#747474}

So as you can see button is disabled and you can't click, you must first write your name and mail after that button is remove disabled and you can send mail. For this im write code here is: http://pastebin.com/8u23G90b

But something is wrong here, in chrome and IE disabled never removed from button, im also load jquery 1.7.1

p.s sorry for my english

Answer

J. Holmes picture J. Holmes · Feb 11, 2012

Remove the attribute:

$('button').removeAttr("disabled");

See .removeAttr() for more details