I’m building a widget library for our mobile project. The question is to use jQuery or jQuery mobile for it.
We don’t need jQuery Mobile’s component and page framework. Yes, it’d be great to use it, but for a variety of reasons we’re rolling our own.
That said, jQuery Mobile does have enhanced touch events that we can use, which seems to be missing from jQuery at the moment (looks like that will be added in the 2.0 release). jQuery Mobile is also a smaller file than jQuery, so it makes a lot of sense to go with jQuery Mobile.
My question is why is jQuery Mobile smaller than jQuery itself? Is it missing functionality that is in jQuery? Is it just a newer rewrite so more optimized? Or is it just a lack of support for IE that makes it a thinner file?
jQuery Mobile does not come with jQuery as far as I know. Its download page shows only the JS and CSS for the mobile framework, so that would imply that the main jQuery library is a separate dependency (whose JS file you’ll obtain from the main site, naturally).