So this is my HTML:
<div class="guiSwitch">
<button class="guiSwitchItem" id="#containerBtn">Flex Container</button>
<button class="guiSwitchItem" id="#itemsBtn">Flex Items</button>
</div>
<!-- line 126 - 129 -->
My JS
$("#containerBtn").click(function() {
$("#containerBtn").css("background-color": "#78a7e8", "color": "white");
$("#itemsBtn").css("background-color": "#ededed", "color": "black");
});
My pen: https://codepen.io/Mike-was-here123/pen/MqJZdb?editors=1010
My question is, why does the buttons not change color when i hit them? I am targeting the ID’s and doing css()
. I can’t find any errors in the console either.