정답 스윽 봤는데 그냥 제가 하던 코딩으로 해보려고
질문드려용
HTML은 일케 쓰고
<div class="d-flex justify-content-between json">
</div>
스크립트파일에는
$.ajax({
url: 'store.json',
type: 'GET'
}).done(function (data) {
console.log(data)
for(let i = 0 ; i<data.length; i++){
let temp = `<div class="col-2 border border-secondary rounded p-0 mx-2" data-index="${index}">
<img src= "${data.photo}" class="proimg">
<h5 class="m-4">${data.product_name}</h5>
<h6 class="m-4">${data.brand_name}</h6>
<div>
<p>${data.price}</p>
</div>
</div>`
$('.json').append(temp);
}
});
이렇게해서 상자가 늘어나게 해보려고했는데
콘솔로그에 data는 뜨는데
html에 다른 변화나 오류도 안뜨는데 아무런 변화가 없어요
코딩이 안먹어요 ㅠㅜㅠ
제가 어디서 오류를 범하고있는지 모르겠어여 흐그극그