COURSES
MEMBERSHIP
Login
COURSES
MEMBERSHIP
Login
Patrick Morrow
/
Tic-Tac-Toe: Using jQuery, Bootstrap, HTML, CSS and PHP
Buy now
$19
Tic-Tac-Toe: Using jQuery, Bootstrap, HTML, CSS and PHP
In this course you will learn how to create a Tic-Tac-Toe game using jQuery, HTML, Bootstrap and PHP.
Buy now
Contents
INTRODUCTION
Preparing the development environment
CREATING THE GRID
Setting up the HTML Page
Preview
Setting up the Tic-Tac-Toe grid
Preview
Styling the Tic-Tac-Toe grid
Adding button tracking code
PLAYER SELECTIONS
Dealing with human player selections
How to generate a random number
Preview
Dealing with computer player selections
Adding a delay between human and computer selections
Enabling and disabling buttons
CHECKING WINNING COMBINATIONS
Adding an array of winning combinations
Parameters and Arguments
How to iterate through an array using jQuery
Check for a win - the main logic
Final tweaks
Displaying the Win or Lose Message