Skip to content

Commit

Permalink
Merge pull request #8 from Mohammadflht/help
Browse files Browse the repository at this point in the history
Merging help branch with original
  • Loading branch information
Mohammadflht authored Mar 11, 2024
2 parents 3b7031e + 18393a9 commit 78c480d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,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
Binary file added images/credit-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/favicon-32x32.png
Binary file not shown.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- displays site properly based on user's device -->

<link rel="icon" href="./images/favicon-32x32.png" />
<link rel="icon" href="./images/credit-card.png" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/media.css" />

<title>Interactive card details form</title>
<title>Interactive card</title>
</head>
<body>
<section class="container">
Expand Down

0 comments on commit 78c480d

Please sign in to comment.