http://perpetual.education is a design/programming school. We like to be part of the discussion over here at Dev.to / We have time-slots for free conversations for career advice IRL : )
Cool explorations! Over the years, we've built these so many ways!!! It's crazy. You can even use a checkbox now - and skip the JavaScript completely - but on the subject of JavaScript: check out this approach
With this style of "event delegation" (having one listener and then doing different stuff depending on what is clicked) - you can really simplify the whole thing. What do you think?
http://perpetual.education is a design/programming school. We like to be part of the discussion over here at Dev.to / We have time-slots for free conversations for career advice IRL : )
Cool explorations! Over the years, we've built these so many ways!!! It's crazy. You can even use a checkbox now - and skip the JavaScript completely - but on the subject of JavaScript: check out this approach
With this style of "event delegation" (having one listener and then doing different stuff depending on what is clicked) - you can really simplify the whole thing. What do you think?
Here's a more fleshed out example too. : )