From ded8a7d8758c81a70312ddd2c184f7d1c58c60e8 Mon Sep 17 00:00:00 2001 From: WillSimao Date: Fri, 18 Nov 2022 14:12:35 -0300 Subject: [PATCH] =?UTF-8?q?feat(TouristAttractions):=20Desenvolve=20c?= =?UTF-8?q?=C3=B3digo=20Js=20que=20adciona=20a=20img=20o=20titulo=20e=20a?= =?UTF-8?q?=20descri=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/js.js b/js.js index e3c6ac0..20e6952 100644 --- a/js.js +++ b/js.js @@ -11,7 +11,7 @@ document.addEventListener('DOMContentLoaded', function () { const inputDescription = document.querySelector('.input-text__descricao'); const form = document.querySelector('.form__tourist-attractions'); - const ulList = document.querySelector('wrapper-ul__cards'); + const ulList = document.querySelector('.wrapper-ul__cards'); //Image Preview inputFile.addEventListener('change', (e) => { @@ -75,23 +75,23 @@ document.addEventListener('DOMContentLoaded', function () { }else { alert('Preencha todos os campos') } -}) +}); - const renderListItems = () => { - let spotStructure = ''; + function renderListItems () { + let spotStructure = ''; - list.forEach((i) => { + list.forEach(function (i) { spotStructure += `
  • -
    +
    Imagem Turismo

    ${i.titulo}

    - p class="result-card__description">${i.description}

    +

    class="result-card__description">${i.description}

  • @@ -100,7 +100,7 @@ document.addEventListener('DOMContentLoaded', function () { - // ulList.innerHTML = spotStructure; + ulList.innerHTML = spotStructure;