Created:18 Apr 2022 15:05:28 , in Web development
JQuery has conquered the frontend web development world since it was first released many years ago. Even today, in year 2022, the library, and libraries influenced by it, like $cash, still can be found across fronted code bases.
However, even though it' been a slow process, web developers have been trying to wean themselves off jQuery for a good couple of years now. The process has trully kicked off with the release of ECMAScript 2015 (also known as ES6) specification and advent and wider adoption of more modern alternatives to jQuery like React, Vue.js or Angular.
In this post I take a brief look at what functionality you as a front end developer might no longer need jQuery for.
//jQuery $("selectorName") // using HTML5 DOM API document.querySelector("selectorName") or document.querySelectorAll("selectorName"
Appending content to an element
//jQuery $("selectorName").append( "content") // vanilla JavaScrpt let element = document.querySelector('selectorName'); let text = document.createTextNode("content"); element.appendChild(text);
Adding a class name to an element
This post was updated on 27 Apr 2022 22:33:03
Author, Copyright and citation
Author of the this article - Sylwester Wojnowski - is a sWWW web developer. He has been writing computer code for the websites and web applications since 1998.
©Copyright, 2023 Sylwester Wojnowski. This article may not be reproduced or published as a whole or in parts without permission from the author. If you share it, please give author credit and do not remove embedded links.
Computer code, if present in the article, is excluded from the above and licensed under GPLv3.
Cite this article as: