- You Might Not Need jQuery
- From jQuery to JavaScript (Cheatsheet & Workflow)
- Cheat sheet for moving from jQuery to vanilla JavaScript | Tobias Ahlin
- Converting jQuery to vanilla JS | Go Make Things
// jQuery
// -----------
$('.click-me').on('click', function (event) {
// Do something...
});
// vanillaJS
// -----------
// Listen to all click events on the document
document.addEventListener('click', function (event) {
// If the clicked element does not have and is not contained by an element with the .click-me class, ignore it
if (!event.target.closest('.click-me')) return;
// Otherwise, do something...
});https://gomakethings.com/how-to-convert-the-jquery-click-method-to-vanilla-js/