Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
Binary file added README.md
Binary file not shown.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ for (let i = 0; i < itemQty.length; i++) {
itemQty[i].innerText--
cartTotal.innerText--;
}
})
});
addBtn[i].addEventListener("click", () => {
itemQty[i].innerText++
cartTotal.innerText++;
})
});
}
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="styles.css">
<title>Document</title>
<title>Add To Cart App</title>
</head>

<body>

<div class="container">
<h1>Total items: </h1>
<a href="/store/cart.stml" class="cart position-relative d-inline-flex" aria-label="View your shopping cart">
<a href="#" class="cart position-relative d-inline-flex">
<i class="fas fa fa-shopping-cart fa-lg"></i>
<span id="cart-total" class="cart-basket d-flex align-items-center justify-content-center">
0
Expand Down