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:

image description Enter only if I click again, or if I move the mouse to at least 1 pixel then the button is displayed as disabled: </ p> <p> <img src =

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

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -