jQuery instantly executes (a button click and css change) on load
The .click() function triggers a click. This is why this is happening. After the click .css() runs and turns the button orange. If you want to change the colour on click then, as clear from the documentation, the event handler needs to be passed as a callback function to .click(), not chained to it: $(document).ready(function() … Read more