On a click event, the page loads the game board and several elements are hidden / shown.
Instead of having this giant thing mixed in the function:
$('.playervscomputer').css('display', 'block');
$('.player_vs_cpu_board').css('display', 'block');
$('.player_vs_computer_color_selection').css('display', 'block');
$('.player_vs_computer_start_button').css('display', 'block');
$('.header').css('display', 'block');
$('.hide_answer').css('display', 'block');
$('.intro').remove();
$('.player_board_header').css('display', 'inline');
$('.intro').css('padding-top', 'none');
$('#show_after_starting').css('display', 'inline');
$('#mastermind_table_ten_cpu').css('background-color', 'yellow')
Does anyone know if it's possible to wrap this up in its own function and just call the function when the click event occurs? I tried this, but it was unsuccessful (I'm assuming I did this wrong...)
Thanks