If you search Stackoverflow for selecting html elements on a page you will be overloaded by jQuery example’s.
You can also read everything on my blog: https://mrfrontend.org/2017/10/javasc...
Since I’m a bigger fan of learning Vanilla JavaScript to get into JavaScript in general, I want to show you how to do it with the querySelector and querySelectorAll.
The querySelector methods are just that easy as the jQuery selector.
Enjoy! If you have comments, questions or opinions please share them in the comments! 😇Or you can send a Tweet or DM via Twitter: / frontendmr
If you like the content I make, please support me via Patreon: https://buff.ly/2SetRp6
Read more content on my blog https://mrfrontend.org/ or Medium publication / mr-frontend