Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

193
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda