Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

305
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!