Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How so? Who stops you from doing something like `const $ = document.querySelector`?


There's a ton of other functions you need like element.addEventListener, insertAdjacentElement, XMLHttpRequest (when you need progress) etc. etc. At that point you might as well save yourself and the person after you a major headache and just use jQuery whose API everybody knows.


The big magic of jQuery is that you can act on an array of elements as if it were a single element. Your alias does not give you that at all.


Good point




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: