Tic-Tac-Toe: Using jQuery, Bootstrap, HTML, CSS and PHP
Buy now
Learn more
INTRODUCTION
Preparing the development environment
CREATING THE GRID
Setting up the HTML Page
Setting up the Tic-Tac-Toe grid
Styling the Tic-Tac-Toe grid
Adding button tracking code
PLAYER SELECTIONS
Dealing with human player selections
How to generate a random number
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
Products
Course
Section
Lesson
Setting up the HTML Page
Setting up the HTML Page
Tic-Tac-Toe: Using jQuery, Bootstrap, HTML, CSS and PHP
Buy now
Learn more
INTRODUCTION
Preparing the development environment
CREATING THE GRID
Setting up the HTML Page
Setting up the Tic-Tac-Toe grid
Styling the Tic-Tac-Toe grid
Adding button tracking code
PLAYER SELECTIONS
Dealing with human player selections
How to generate a random number
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