Possible Duplicate:
When should I use a javascript framework library?
All,
I'm fairly new to web app development.
Recently, I've built a few HTML5 apps specifically targeted at iPads and iPhones.
I've noticed that very few people seem to use straight JavaScript - virtually everyone uses jQuery (Prototype, YUI, Mootools, etc. seems somewhat less popular).
If I'm starting out - SHOULD I use jQuery? Or, would I be better off writing my own JavaScript?
In general - I prefer using as much of "my own" code as possible. I'm uncomfortable using a framework if I can avoid it - I feel like it prevents me from understanding what's going on "underneath the hood."
(Sure - even if I'm using straight JavaScript - there are many levels "underneath the hood" (e.g., browser's JavaScript enging, the OS, kernel, etc.), that I don't understand, but the lower the level I do understand, the better.)
The only concrete advantage I can think of for not using jQuery... loading the ENTIRE jQuery framework, when I only need a handful of it's functions - seems unnecessary and wasteful.
So - in general - would I be better off creating my own, highly-tailored, application-specific JavaScript for each project?
Or - should I bite the bullet, get over my reluctance to use someone else's code, and use jQuery? Are there advantages to it besides just not having to create my own versions of functions that have already been written by someone else?
E.g., are it's functions somehow optimized or more efficient than what I could produce on my own?
[UPDATE]
One of the common themes in the answers so far... jQuery eliminates the need to worry about browser differences. Good point.
By in my case, I'm writing apps specifically for the iPhone, iPad, and Android. As far as I know - the browsers are pretty consistent. The vagaries and idiosyncrasies of IE6, 7, and 8 really don't seem to apply. Is that true? If so, does it eliminate a major reason for using jQuery?
Another key issue... jQuery is so popular, that there's a good chance that it's already in the user's cache, thus eliminating the need to load it. True... but is that the only performance hit? In other words... does the existence of the hundreds of functions that are part of jQuery impact the performance of my page? (I don't know how JavaScript engines work, so I have no idea if this is the case...).
Many thanks in advance for your advice and guidance.