Here’s how the button looks like in default:
<button class="btn primary bidbutton">Bid Now!</button>
And in Javascript, during a certain event, I do the following:
$(this).siblings('.bidbutton').addClass("disabled");
$(this).siblings('.bidbutton').attr("disabled", "");
So basically this is supposed to disable the button from being clicked in a given event.
When I refresh the page, sometimes this dynamically assigned style is still applied.
Why?
Should it display it’s default, manually set, style on the page?
I can reproduce the problem with code similar to yours on FireFox v7.0.1. IE7 doesn’t do it. Caching sometimes gets in the way of what you think should happen on a refresh. On some OS’s/browsers you can do a [CTRL + F5] refresh or hit [Enter] key in the address bar to force a reload (yes, it corrects the issue in FireFox).
There’s an
autocompleteattribute which can disable caching, but it doesn’t help in this case. You are at the mercy of the browser.