4 ms·
if you still want jquery in 2020 (and that's ok because raw DOM apis still need sugar), for the love of god please use https://umbrellajs.com/ https://umbrellaj
by leeoniya 6y ago
if you still want jquery in 2020 (and that's ok because raw DOM apis still need sugar), for the love of god please use https://umbrellajs.com/ https://umbrellajs.com/ instead.
it's like 1/10th the size, api-compatible and well-architectured.
- biggestlou 6y agoOr AlpineJS
- deleted 6y ago[deleted]
- whycombagator 6y agoReminds me of https://github.com/madrobby/zepto https://github.com/madrobby/zepto
- manigandham 6y agoAnd cash: https://github.com/fabiospampinato/cash https://github.com/fabiospampinato/cash
- gnalck 6y agoThis is pretty neat! I was just looking around for a "modern, smaller" JQuery equivalent and did not come across this. The older equivalents in this space I saw were Zepto and Cash. Out of curiosity, what do you think of Alpine.js and Stimulus.js, which come to mind when I think of smaller utility libraries for adding "sprinkles" of JS?
- leeoniya 6y ago> Out of curiosity, what do you think of Alpine.js and Stimulus.js no experience with those, but if you're feeling masochistic, try these: https://github.com/finom/balalaika https://github.com/finom/balalaika https://github.com/finom/bala https://github.com/finom/bala
- earthboundkid 6y agoI have been using Alpine and enjoying it. Stimulus is too much like Rails—convention over configuration—for me to get into. Alpine feels like a nice middle ground between Vue and Vanilla.
- ww520 6y agoDoes it support bubbling event handling? In the form of: $(".outer").on("click", ".inner", function(){ ... } ) Without bubbling event handling, it's a no go for handling event on dynamically generated inner content.
- leeoniya 6y agoallow me to acquaint you with Element.matches(): https://developer.mozilla.org/en-US/docs/Web/API/Element/matches https://developer.mozilla.org/en-US/docs/Web/API/Element/mat... https://jsfiddle.net/dg3rL81z/ https://jsfiddle.net/dg3rL81z/
- ww520 6y agoI mean, sure, I can use the lower level API to check in a separate step. The point of a library is to provide the functionality to reduce the boiler plate checking.
- leeoniya 6y agoalright then. sounds like you're able to make an informed decision for yourself. when i was doing jquery dev i never needed so much event delegation that avoiding an occasional 1-liner for event filtering* justified using a lib that's 10x larger. * in limited cases like tabular data or large lists