Sign in
Log inSign up

I feel great when I replace jQuery with JavaScript... What about you?

Tom Alter's photo
Tom Alter
·Oct 17, 2016

That moment you convert jQuery to JavaScript... I feel super charged and awesome! 🤓 😎

My latest conversion:

jQuery

$(elem).addClass('anim-elem');
JavaScript 

if (elem.classList)
  elem.classList.add('anim-elem');
else
  elem.className += ' anim-elem';

What was your last jQuery to JavaScript?

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct