Is jQuery still needed?

Is jQuery still needed?

By Matthew Maher  •  January 13, 2015  •  2032 Views

Netwoven Blog

In the recent months I’ve seen a lot of backlash against jQuery. It is true that when jQuery made it mainstream everyone and their brothers included it on their pages even if it wasn’t needed. Lots of great WordPress plugins also overuse and abuse jQuery on our sites (Netwoven.com included). But even after all this jQuery is an indispensable library in our chest of tools.

The time it would take to write an advanced function like toggleClass is measurable (below is the eleven line JavaScript equivalent). Developers would much rather spend time solving more complex problems than figuring out the JavaScript required to toggle a CSS class. There is also a higher level of knowledge required to be coding in pure JavaScript, jQuery lowers that bar which lets more developers to collaborate on projects.

Javascript translation of toggleClass:

if (elem.classList) {
elem.classList.toggle(className);
} else {
var classes = elem.className.split(' ');
var existingIndex = classes.indexOf(className);

if (existingIndex >= 0) classes.splice(existingIndex, 1); else classes.push(className); elem.className = classes.join(‘ ‘); }

Matthew Maher

Matthew Maher

Matthew Maher is the Vice President of Delivery at Netwoven, bringing nearly 20 years of experience working with Fortune 500 companies to implement large-scale enterprise systems. He has led major digital initiatives across industries including technology, healthcare, finance, and retail. As an early member of the Netwoven team, Matthew played an integral role in scaling the organization from its infancy to a thriving Microsoft solutions partner. In his current role, Matthew heads cross-functional delivery teams and oversees complex cloud and security solution deployments.

Leave a comment

Your email address will not be published. Required fields are marked *

Dublin Chamber of Commerce
Microsoft Partner
Microsoft Partner
Microsoft Partner
Microsoft Partner
Microsoft Partner
Microsoft Partner
Microsoft Fast Track
Microsoft Partner
MISA
MISA
Unravel The Complex
Stay Connected

Subscribe and receive the latest insights

Netwoven Inc. - Microsoft Solutions Partner

Get involved by tagging Netwoven experiences using our official hashtag #UnravelTheComplex