loading...

re: Writing a .parents() function using Vanilla JS VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Great article ... All in all if you want pure DOM manipulation (not using React or Vue or whatever) then still nothing beats the jQuery API for el...
 

Thanks!

Youre right a jquery lite could be a good idea.

 

Something like that might even exist already, previously there was something called zepto.js ... it still "exists" but latest version is from 2016 (and nobody uses it anymore I think) ... then there's"jquery-lite" (github.com/deager/jquery-lite) which is 5 years old and very limited ... no those 2 aren't going to win the war.

"jQuery Slim" looks better, but still large ... then this one, "Cash":

github.com/fabiospampinato/cash

I think that's what we would be looking for - almost all of the stuff you need and want from jQuery (including "parent()", "closest()", "append()", "on()", "off()", you name it), but the download is 3 to 4 times smaller.

Next question is, does it perform equally well as jQuery ... if it downloads quicker but execution is sluggish then you haven't gained anything.

interesting i'll have a look at these thanks.

But i'm anyways working on enhancing my vanilla js skills so im gonna try to get as good with JS as i am with jquery and i wont even think about the convenience jquery has in a few months :)

Code of Conduct Report abuse