It's true that jQuery is a lot more than just a selector engine. But it does seem like a lot of what else it does might become obviated by bleeding edge browsers, for example:
Animations
jQuery's Effects such as animate(), fadeOut(), etc are taken care of by CSS transitions.
Ajax
jQuery takes care of abstracting browser differences, such as using ActiveXObject("Microsoft.XMLHTTP")
instead of XmlHttpRequest()
in older versions of IE. This fallback is quickly becoming unnecessary.
jQuery's Ajax also provides JSON-P for cross-domain Ajax. This won't be necessary with proper cross domain XmlHttpRequest as implemented in the latest browsers.
Event binding
jQuery abstracts away IE's attachEvent
vs everyone else's addEventListener
. But since IE9 will provide the standard method, that abstraction will also become unnecessary.
This all means that "dropping down to raw JavaScript" will become less barbaric than in the past. However, it's still nice to have the library. Take jQuery's central genius, the idea of sets acted upon in parallel. In jQuery you write:
jQuery("#something").hide();
In raw JavaScript you write:
var things = document.querySelectorAll("#something");
if (things.length > 0) {
things[0].style.display = "none";
}
This kind of grace will never be fully available from builtin DOM methods.