Open Chrstjan opened 8 months ago
In the cards.js file make a function called buildProductCard
The function should
Get the dom element with the id cardsContainer
Ensure the provided data is as expected and convert it if necessary.
Create DOM elements for the product container, header text, image, reviews container, price/button container, button, footer container, description
text, and stock amount text.
Populate each element with the relevant content or attributes derived from the provided data.
Append the created cards to the cardsContainer
Changed to app.js can be moved to cards.js later when the code works
In the cards.js file make a function called buildProductCard
The function should
Get the dom element with the id cardsContainer
Ensure the provided data is as expected and convert it if necessary.
Create DOM elements for the product container, header text, image, reviews container, price/button container, button, footer container, description
text, and stock amount text.
Populate each element with the relevant content or attributes derived from the provided data.
Append the created cards to the cardsContainer