On Saturday, June 25, 2016 at 1:39:01 PM UTC-5, Michael Haufe (TNO) wrote:
> I will say do it without jQuery and see how far you get. If you run into something that feels awkward or difficult, post here in the the group and we can go from there.
>
> JavaScript and Browsers has evolved significantly since you last played with them I suspect
Yuck... drunken replies. Small correction and addition:
JavaScript and browsers HAVE evolved significantly since you last played with them I suspect.
Sadly I still have a number of projects that have jQuery has a dependency, but I've noticed that even with this dependency, only the Ajax related functionality is actually used. For example:
1. $("someSelector") is not necessary since someElement.querySelector("someSelector") and someElement.querySelectorAll("someSelector") exist now in modern browsers:
<
https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector>
<
https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelectorAll>
Often I have two functions available that I use:
var qs = (selector,context) => (context || document).querySelector(selector);
var qsa = (selector,context) => Array.from((context || document).querySelectorAll(selector));
Which lets me do the following:
qs("#someElement").addEventListener(...)
and
qsa(".someElements").map(MyObjectWrapper)
.......
2. Animations: CSS has this now:
<
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animations>
3. Ajax
Admittedly I still use this functionality from time to time, but if I spent a day playing with it, a comparable or better solution could be created (though I'd personally use Babel or TypeScript to keep this convenient)
4. probably others, but at the moment I think this enough beating of this dead-horse of a library