3 ms·
"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 implem
by pseudosavant 6y ago
"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/b86eedd9960ade958d49447130c95811 https://gist.github.com/pseudosavant/b86eedd9960ade958d49447...
- _ZeD_ 6y ago> 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?
- pseudosavant 6y agoNo, 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.