Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ <h1>Rakesh's Memory Game</h1>

<ul class="deck"></ul>

<button id="open-modal">
open
</button>

<div id="popup1" class="overlay">
<div class="popup">
<h2>Congratulations!!</h2>
Expand All @@ -52,6 +56,9 @@ <h2>Congratulations!!</h2>
<button id="play-again">
Play again 😄
</button>
<button id="play-again">
Share!
</button>
</div>
</div>
</div>
Expand Down
9 changes: 7 additions & 2 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function generatedCard(card) {
//declare empty array as openCards
let openCards = [];

// declare variables for star icons
//declare variables for star icons
const stars = document.querySelectorAll(".fa-star");

// stars list
Expand Down Expand Up @@ -58,6 +58,7 @@ function shuffle(array) {
return array;
}

//initite game
initGame();
let timerActive = false

Expand Down Expand Up @@ -251,4 +252,8 @@ document.getElementById("play-again").addEventListener("click", function() {
function playAgain() {
modal.classList.remove("show");
restartGame();
}
}

document.getElementById("open-modal").addEventListener("click", function() {
modal.classList.add('show');
});