4 ms·
So I guess I'll be the first to ask the obvious question. How is this different or better than jQuery?
by dccoolgai 13y ago
So I guess I'll be the first to ask the obvious question. How is this different or better than jQuery?
- CmonDev 13y agoThere is a small FAQ in the bottom.
- jhh 13y ago"Not so much. This doesn't wrap or hide the DOM for you. It exposes and enhances it, making it your ally instead of trying to protect you from it. Old IE versions are fading; it's time to go native!" This seems like a pretty poetic way of describing differences between software packages. And I mean that in a non-charming way.
- dccoolgai 13y agoI red the faq... didn't really answer my question... from the examples I saw, there was nothing there that ouldn't be achieved with JQ...which is why I brought it here...thought maybe I was missing something.
- smanuel 13y agoWell... everything could be achieved with JQ. Usually with 1 line of code. But that library is 2.7k and you're working directly with the DOM elements and not with wrappers. So I guess it could come handy for smaller projects where you wouldn't need the full JQ power and 10 JQ widgets.
- grey-area 13y agoIt doesn't wrap and extend dom elements, just finds them, so there's no $(this) etc just to be sure all your objects behave the same way, no .attr('id') to get attributes etc. It also has a nicer syntax I think, like the idea of doing HTML.body.ul.li.a So it looks interesting, though I wish they had included Ajax. This doesn't do everything jquery does, and is not intended as a drop-in replacement, more as a different way of doing things which is simpler, smaller and more intuitive.
- maxhowell 13y agoWhat does Hacker News recommend as a standalone AJAX solution nowadays?
- grey-area 13y agoNot sure if it is a complete replacement, but I needed to remove a dependency on jquery recently and used this code: https://github.com/inkling/backbone.native/blob/master/backbone.native.js https://github.com/inkling/backbone.native/blob/master/backb... The $.ajax function was all I needed.
- jonahx 13y agoJust using the native XMLHttpRequest has pretty good support: http://en.wikipedia.org/wiki/XMLHttpRequest#History_and_support http://en.wikipedia.org/wiki/XMLHttpRequest#History_and_supp...
- jenius 13y agoI've used superagent (https://github.com/visionmedia/superagent https://github.com/visionmedia/superagent) a number of times and it's wonderful, but beware if you're trying to make it work with old IE.
- prezjordan 13y agoGeez, has he made everything?
- phpnode 13y agoyes, he has. as has substack. basically everything. but part of the reason they are so prolific is that they focus on very small, single use modules that do one thing well. So they have hundreds of repos, but many of them are 10 - 15 lines of code.
- prezjordan 13y ago