Skip to content

Commit

Permalink
Fix some bugs in showing after clicking on continue button
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammadflht committed Feb 22, 2024
1 parent bb60122 commit 73a4009
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,27 @@ confirmButton.addEventListener('click', function() {
continueButton.addEventListener('click', function() {
completeState.style.display = "none";
formMain.style.display = "block";

// Select all input elements
let inputs = document.querySelectorAll('input');
for (let i = 0; i < inputs.length; i++) {
inputs[i].value = "";
}

// Reset the card details
let cardNumbers = document.querySelectorAll('.card-number p');
for (let i = 0; i < cardNumbers.length; i++) {
cardNumbers[i].textContent = '0';
}

let cardName = document.querySelector('.card-name p');
cardName.textContent = 'JANE APPLESEED';

let cardExpDate = document.querySelector('.card-exp-date p');
cardExpDate.textContent = '00/00';

let cardCVC = document.querySelector('.card-cvc p');
cardCVC.textContent = '000';
});


Expand Down

0 comments on commit 73a4009

Please sign in to comment.