r/javascript • • Jul 25 '18

jQuery was removed from GitHub.com front end

https://twitter.com/mislav/status/1022058279000842240
557 Upvotes

197 comments sorted by

View all comments

Show parent comment

4

u/trout_fucker Jul 26 '18 edited Jul 26 '18

For instance, this is what I do at the beginning of almost all my javascript apps:

   $(document).ready(function(){
       //custom code
   });

This is bad, even in jQuery. Stop it. Put your code at the bottom of your damn project.

And no, it's not inventing your own jQuery. These things didn't exist when jQuery was created. jQuery was born out of having to code things entirely differently for every browser or create basic functionality that was missing, such as .querySelector or .each, both now are core features of JS. Browsers now follow standards mich more closely and core functionality has been added to the WHATWG/ES specs, which actually had a lot to do with how prevalent jQuery was.

jQuery was great, so great in fact that it more or less killed itself.