3 ms·
The first example alone is reason enough to use jQuery - why would I want to use four statements instead one? Why would I want to have to remember to call `send
by VMG 13y ago
The first example alone is reason enough to use jQuery - why would I want to use four statements instead one? Why would I want to have to remember to call `send`? Why do I have to remember the last boolean parameter of `open`?
- sfeng 13y agoTotally valid, but just to say, jQuery's API is just as arbitrary, you just happen to know it better. If you use the native XHR a couple times, you know what open's parameters are.
- alxndr 13y agoIt is just as arbitrary, but I feel jQuery's API is also easier to grok at a glance. Using either a couple times may instill the parameters in your memory, but what about coming back to it after six months?
- ufo 13y agoIf you are writing a library, eliminating a dependency is worth much more then 4 lines of code. But yeah, if you are just writing code for your own site then knock yourself out.