<button style="background-color:lightblue" id="extractv">
<b>
Extract<br>v
</b>
</button>
...
$("#extractv").click(function () {
$("#extractv").removeAttr("style");
});
After someone clicks on the button, I want to remove the background color on the button. I am not sure why it’s not working.
Thanks
Gordon
I’m not exactly sure why the code you posted doesn’t work but the following will do the trick
jsfiddle version: http://jsfiddle.net/UUxHJ/
As others have pointed out though it’s better (more future-proof) here to only remove the background-color versus completely taking out the style attribute.