David
@ASVN2All comments
- @Simonify30Submitted almost 2 years ago@ASVN2Posted almost 2 years ago
Man I like that way you done the project with, here's something maybe could help you developed that you can for example add the title that has value , you can add that value from js dynamically with out put it with your hand and also that green column you can compared the prices of these column in js and the bigger color it to green
0 - @Edval6Submitted almost 2 years ago@ASVN2Posted almost 2 years ago
You can fix one problem between these I sow that one when you click on the small image of product it's active but the previous one it's still active to you can fix that by remove the active class from all when you click and add it on the clicked on the clicked on it
------------------------Code-----------
// array of small under in perview images
const smallImages = document.querySelectorAll(".image img");
// here you just for on the image and active the one that clicked
smallImages.forEach((image) => {
image.addEventListener("click", () => {
image.classList.add("active");
});
});
// the same but here we will remove the active from the prev one
smallImages.forEach((image) => {
image.addEventListener("click", () => {
smallImages.forEach((image) => {
image.classList.remove("active");
});
image.classList.add("active");
});
});
0 - @Dany-GitHubSubmitted almost 2 years ago
Any feedback is appreciated, Thank you 🤩✌
@ASVN2Posted almost 2 years agoIt's look great you can fix the float number after " , " some time the result could be more then 2 number after " , " you can fix it with add toFixed( )
line 41 = tipAmount.innerText =
${(amount).toFixed(2)}
line 42 = totalAmount.innerText =
${(amount / data.people).toFixed(2)}
Marked as helpful1