DEV Community


Discussion on: Writing a .parents() function using Vanilla JS

leob profile image
leob • Edited

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" ( 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":

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.

Thread Thread
urielbitton profile image
Uriel Bitton Author

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 :)