Creating Dynamic Elements can be fun until you get caught in the web of the bubble effect (lol)
At some point I was in that web, but now I understand more about event delegation.
This is my version of the popular Etch A Sketch from The Odin Project.
Some stuff I did and learned
- Create dynamic HTML elements with JavaScript
- Listen to mouse event on the elements that make the grid
- Remove the grid on page when user changes grid size and recreate the grids with new value
- Use javascript to add hover effect to grid
Live demo >> https://espinovah.github.io/sketch-up/
Kindly check it out.