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

142
Views
API Project issues

I have two issues I'm encountering. The First is with the following lines of code and getting a break to work.

    let lineBreak = '\n'
    let c = document.getElementById("containerC")
    let day = data.days
    for(let x = 0; x < 5; x++){
        let p = document.createElement("p") 
        c.append(p)
        p.append(day[x].datetime, lineBreak,   
            day[x].temp * 9 / 5 +32 + " F" + ", ",
            day[x].conditions + ", ",
            day[x].description,
            )       
    }
}

The second is getting multiple Divs to style based on my api's results for the condition. When it selects more than 1 div the page errors and won't load the divs at all.

function weatherBG(data) {
    let currentCondition = data.currentConditions.conditions
    let containers = document.querySelectorAll("container")
    if(currentCondition == currentCondition){
        containers.css(backgroundImage = url('https://media1.giphy.com/media/t7Qb8655Z1VfBGr5XB/giphy.gif?cid=ecf05e471vbipwsodtlvxejxnbteynw6twxn5abw348fi79q&rid=giphy.gif&ct=g'))
    }
}

Any help would be greatly appreciated. I'm far overdue on this and need to get it done.

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!