-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
29 lines (22 loc) · 1.03 KB
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const CreePartie = document.getElementById('CreePartie');
const RejoindrePartie = document.getElementById('RejoindrePartie');
const container = document.getElementById('container');
// For the "Créer une partie" button
const createGameButton = document.getElementById('create-game-button');
createGameButton.addEventListener('click', () => {
event.preventDefault(); // Prevent default form submission behavior
window.location.href = "page3.html"; // Redirect to page3.html
});
// For the "Rejoindre une partie" button
const joinGameButton = document.getElementById('join-game-button');
joinGameButton.addEventListener('click', (event) => {
event.preventDefault(); // Prevent default form submission behavior
window.location.href = "page3.html"; // Redirect to page3.html
});
// For switching between sign-up and sign-in forms
CreePartie.addEventListener('click', () => {
container.classList.add('right-panel-active');
});
RejoindrePartie.addEventListener('click', () => {
container.classList.remove('right-panel-active');
});