Read more

Guideline for moving from jQuery to vanilla JavaScript

Hannes Randow
November 08, 2019Software engineer at makandra GmbH

jQuery is still a useful and pragmatic library, but chances are increasingly that you’re not dependent on using it in your projects to accomplish basic tasks like selecting elements, styling them, animating them, and fetching data—things that jQuery was great at. With broad browser support of ES6 (over 96% at the time of writing), now is probably a good time to move away from jQuery.

Practical and clear reference with the most common jQuery patterns and their equivalent translations in vanilla JS Show archive.org snapshot

Additional equivalents

jQuery Vanilla JS Effect
el.on('click', doStuff) el.addEventListener('click', doStuff, { once: true }) executes Event Handler just once
$(el).data('importantStuff') el.dataset.importantStuff access to data property
Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

For a deeper dive: Take a look at Henning's presentation

Posted by Hannes Randow to makandra dev (2019-11-08 14:56)