Get 50% off all memberships! Black Friday offer ends Dec. 6 @11:59pm EST. View Pricing
Hi,
This shouldn't be too hard. Here's the basic skeleton:
First include the necessary HTML in the same file as your canvas tag.
Like:
<div id="stuff" style="">Put your content here inside the div or whatever tag is appropriate</div>
<canvas id="canvas"></canvas>
then in your javascript simply add an event listener:
let stuffElement = document.querySelector('#stuff');
stuffElement.addEventListener('click', (event) => {
// Place event related code here... use javascript to generate the HTML
});
Alternatively, you could code all the HTML content in the HTML file and simply set the visibility on click.
Hope that helps!
Cheers :)
EightBitRx
Wow... just looked at the date and saw I'm 20 days late to the party... well, I'll post this anyhow.
Want to participate?
Create a free Chris Courses account to begin