I can get my jQuery to work when I add it to the HTML file. However, I want the onclick function to trigger changes via jQuery and it is not working, any ideas why?
let startButton = document.getElementById("start-button");
startButton.onclick = () => {
if (currentlyPlaying === false) {
gameInitiate()
}
$('document').on('click', function(){
$(this).css('background-color', 'red');
})
};