jquery - Button disabled effect not working after 1st click -
I'm disabling a button with jQuery, it works, but there is a strange behavior in Chrome if I I click the button, it stays with the disabled-disabled color:
Here is my code:
button ID = "reset" type = "button" & gt; Reset & lt; / button & gt; $ ('# reset'). (Function () {$ (this) .attr ('disabled', true);}); For some reason, it works fine on the demo:
In my localhost version, I tried to snatch parts of the page, js chunks, css parts, etc., but by then The disabled version of the button will not display until I do not click on it again. Any ideas?
try it
$ ('# reset') .click (Function () {$ (this) .attr ('disabled', true); $ (this) .attr ('disabled', false);});
Comments
Post a Comment