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

192
Views
element.parent() isn't working - doesn't format anything on the webpage?

Edit: Also should mention that I didn't write the js file...I just added the canvas.parent()line so I could integrate it with the rest of our website. This is a group project.

This might be a silly question but for some reason I can't get my canvas.parent() element to work. Any changes made to the container doesn't affect the position of the sketch on my page.

Here's the setup function from the sketch.js:

  var canvas = createCanvas(ww, hh);
  loadFlights();
  canvas.parent('visualization');
}

And here's the snippet from the HTML file:

<div class = "btns">
 <button onclick="createFlightFromForm()" class = "btn">Submit</button>
 <button onclick="save('myCanvas.jpg');" class ="btn">Save Map</button>
</div>
  
<div id='visualization'></div>

I'm very new to HTML/CSS/Javascript so any help would be appreciated!!

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!