Hacker News new | past | comments | ask | show | jobs | submit login

"The jQuery API is still (and probably aways will be) far superior to the native DOM"

The jQuery API really is so well done. I stopped using jQuery, but implemented a simple script (jSugar.js) that exposes many basic jQuery things but is really just a wrapper for native DOM operations. It only operates on individual DOM nodes. Any looping should be done using your JS loop of choice (forEach, for loop, which, etc).

The script started out really small. I've slowly added more and more as I need more functionality for some projects.

https://gist.github.com/pseudosavant/b86eedd9960ade958d49447...




> The jQuery API really is so well done. I stopped using jQuery, but implemented a simple script (jSugar.js) that exposes many basic jQuery things but is really just a wrapper for native DOM operations.

so... like jQuery?


No, because jQuery normalizes all sorts of DOM stuff. Part of the reason it is 30kb. What I've done is basically syntatic sugar and is only 74loc.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: