star path error fix

This commit is contained in:
Kara Hoagland 2022-11-14 18:07:33 -08:00
parent b6f3a57231
commit bc276dc30c
4 changed files with 4 additions and 4 deletions

View File

@ -183,7 +183,7 @@ class ReviewCard extends HTMLElement {
ratingDiv.setAttribute("class", "rating");
let starsImg = document.createElement("img");
starsImg.setAttribute("id", "a-rating");
starsImg.setAttribute("src", "./source/assets/images/icons/"+data["rating"]+"-star.svg");
starsImg.setAttribute("src", "./assets/images/icons/"+data["rating"]+"-star.svg");
starsImg.setAttribute("alt", data["rating"] +" stars");
starsImg.setAttribute("num", data["rating"]);
ratingDiv.append(starsImg);

View File

@ -66,7 +66,6 @@ function setupUpdate(){
tagContainer.append(newTag);
}
}
//Take formdata values as newData when submit
form.addEventListener("submit", function(){
/*

View File

@ -33,6 +33,7 @@ function addReviewsToDocument(reviews) {
*/
function initFormHandler() {
/*
//btn to create form (could be its own function?)
let createBtn = document.getElementById("create");
createBtn.addEventListener("click", function(){
@ -41,7 +42,7 @@ function initFormHandler() {
//accessing form components
let tagContainer = document.getElementById("tag-container-form");
let form = document.querySelector("form");
let form = document.querySelector("form");*/
form.addEventListener("submit", function(){
/*

View File

@ -22,7 +22,7 @@
<main>
<!-- Add Food Entries Here -->
</main>
<button type="button" id="create">CREATE</button>
<!--<button type="button" id="create">CREATE</button>-->
<!----> <form id="new-food-entry">
<fieldset>
<legend>Pic:</legend>