Back in 2006, writing JavaScript that worked across browsers was a special kind of hell. IE6 did one thing, Firefox did something else, Safari did whatever it felt like. John Resig built jQuery to make this nightmare go away.
The $()
Function Changed Everything
The dollar sign function was genius - suddenly you could select elements like CSS and chain methods together:
$('#myButton').addClass('active').fadeIn().on('click', doStuff);
This blew everyone's minds in 2006. No more document.getElementById()
bullshit, no more browser-specific event handling code, no more checking if XMLHttpRequest existed before making an Ajax call.
The Plugin Gold Rush (And The Dependency Hell That Followed)
jQuery plugins were everywhere. Need a date picker? There's a plugin. Image slider? Plugin. Data tables? Plugin. The jQuery plugin directory became the npm before npm existed.
Here's what nobody tells you: the jQuery plugin ecosystem peaked in 2012. Most "maintained" plugins haven't been touched since Obama was president. I've spent entire weekends trying to make some ancient carousel work with newer jQuery only to discover the "fix" breaks two other plugins.
Some plugins survived - DataTables, Select2, jQuery Validation. Try building a data grid from scratch and you'll understand why DataTables is still around. Every modern framework tries to replace it and they're all more complicated for basic shit.
But here's the brutal truth: good luck finding a date picker that works on mobile and doesn't look like it's from 2008. That plugin that works perfectly will mysteriously break with the next jQuery version because it calls some internal function. You'll spend 6 hours debugging to find one buried Stack Overflow answer that mentions the fix.
WordPress Sealed the Deal
When WordPress adopted jQuery, that basically guaranteed its survival. WordPress runs like 40% of the web - jQuery wasn't going anywhere.
Every WordPress theme, plugin, admin interface - it's all jQuery. Good luck avoiding it if you work on WordPress sites.
Why It Persists in 2025 (Despite All The Hate)
Here's what the React fanboys don't want to admit - the web isn't just SPAs. Most websites are content sites that need a little bit of interactivity. jQuery is perfect for this:
Need to add a click handler? $('.button').on('click', fn)
Want to toggle a class? $('.nav').toggleClass('open')
Ajax request? $.get('/api/data').done(handleResponse)
Modern frameworks are overkill for these simple tasks. Your freelance budget is $2,000? jQuery gets it done fast and cheap. React? Good luck explaining to the client why setup took three weeks.
I've watched junior developers insist we should "modernize everything" by rewriting a working contact form in React. Three months and $50k later, we had the same functionality but with 10x more complexity and a build process that breaks whenever Node.js updates. The client wants their contact form to slide down when clicked - you can build it in jQuery in 10 minutes or spend a day arguing about state management patterns.
The Numbers Don't Lie
The "jQuery is dead" crowd loves to ignore that it's used on most of the web. Microsoft.com, WordPress.org, Adobe and many other major sites still use it. W3Techs usage statistics show jQuery on 77% of websites. These aren't legacy codebases, they're actively choosing jQuery because it works.
What Actually Changed
Modern browsers finally caught up. document.querySelectorAll()
gives you CSS selectors. The Fetch API handles Ajax. CSS animations are smoother than jQuery's .animate()
. Event listeners work consistently now.
But guess what? jQuery's API is still more convenient:
// jQuery
$('.items').hide().removeClass('active').fadeIn();
// Vanilla JS
document.querySelectorAll('.items').forEach(el => {
el.style.display = 'none';
el.classList.remove('active');
el.style.animation = 'fadeIn 0.3s';
});
Both work fine, but one is clearly faster to write.