Skip to content

Commit 37875a4

Browse files
authored
Fix button ID for new quote functionality
1 parent f111f79 commit 37875a4

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎Sprint-3/quote-generator/quotes.js‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ window.addEventListener("DOMContentLoaded", () => {
2121
displayRandomQuote();
2222

2323
// Attach click listener to the button (assuming button has id "new-quote-btn")
24-
const newQuoteButton = document.getElementById("new-quote-btn");
24+
const newQuoteButton = document.getElementById("new-quote");
2525
if (newQuoteButton) {
2626
newQuoteButton.addEventListener("click", displayRandomQuote);
2727
}
@@ -32,9 +32,6 @@ window.addEventListener("DOMContentLoaded", () => {
3232
const autoPlayToggle = document.getElementById("auto-play-toggle");
3333
const autoPlayStatus = document.getElementById("auto-play-status");
3434

35-
const quoteElement = document.getElementById("quote");
36-
const authorElement = document.getElementById("author");
37-
const newQuoteButton = document.getElementById("new-quote");
3835

3936
// Variable to store the timer interval ID
4037
let autoPlayInterval = null;

0 commit comments

Comments
 (0)