Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

312
Vistas
How to make cards appear inside the desired board?

I'm writing a Trello, I ran into a problem that a card is not being created. The logic should be the following. On clicking the button, a modal opens. There they receive data and send it to an array in localStorega. Then they get data from the storage and update the boards and the card should appear. The data is sent to the array, but as I understand it, they do not find a place to create a card. All button creation functions are in main.js

const createBoardCard = index => {

    const createCardBtn = document.querySelector('.create__card__btn')
    const closeModalCardBtn = document.querySelector('.modalCard__close__btn')
    showCardModal()

    function handleCreateButtonClick() {
        let cardName = cardTitle.value
        let cardDiscription = cardText.value
        let cardTagValue = cardTag.value
        cardArr.push(new cardAdd(cardName, cardDiscription, cardTagValue))
        fillCard()
        addLocal()
        closeCardModal()
        createCardBtn.removeEventListener('click', handleCreateButtonClick)
    }

    createCardBtn.addEventListener('click', handleCreateButtonClick)

    closeModalCardBtn.addEventListener("click", () => {
        closeCardModal()
        createCardBtn.removeEventListener('click', handleCreateButtonClick)
    })
}



const fillCard = () => {
    cardZone.innerHTML = ''
    if (cardArr.length > 0) {
        cardArr.forEach((item) => {
            cardZone.innerHTML += createCard(item)
        })
    }
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda