I am building the tic tac toe game
Basically I am unable to figure out how to modify the button in the modal, when it is clicked ( for example to change color when it is clicked or remove outline)
I am building the tic tac toe game
Basically I am unable to figure out how to modify the button in the modal, when it is clicked ( for example to change color when it is clicked or remove outline)
There are two options I can think of.
:active
on the button’s selector.#my-button:active {
//css
}
click
event in JavaScript:var button = document.getElementById("my-button");
button.addEventListener("click", function(event) {
var _this = event.target;
// change style on _this
});
jQuery is, of course, makes this much easier.