I've been following the javascript questions here for the last few weeks, and I've found a common recurring theme.
Almost any question asked on here that involves JavaScript gets answered with:
Even questions referencing other libraries are answered by saying "Use jQuery instead".
Is jQuery replacing JavaScript as a whole?
This is a serious question. Are we really looking at JavaScripts future. Obviously this community has a strong bias towards jQuery (is that because there's alot of .NET developers?), but does the web development community as a whole share this bias?
No, jQuery does not replace JavaScript, because it is JavaScript. But it helps you a lot, especially in selecting elements and applying functions on elements.
The probably most important argument for using jQuery: You don't have to think about cross-browser compatibility.
Seriously, the different JavaScript implementations in the browsers are driving me crazy.
But I also don't think jQuery should be used for everything. It depends on where (e.g. which browsers) the JavaScript is used and what you actually do.
And as I already answered on other question, you can only master jQuery if you understand JavaScript. It is very easy to write bad jQuery code if you don't understand how it works.
Update:
In fact in modern browsers you can already do stuff you normally used jQuery for, like using selectors or each()
, natively in JavaScript, with document.querySelectorAll()
and the array method forEach()
.
But this is the problem: In modern browsers. jQuery ensures that you can use the same API and don't have to care about the browser version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With