简体   繁体   中英

jQuery vs. jQuery Mobile for DIY mobile UI layer?

I'm about to start building UI widgets for our mobile web site. The main factors are:

  • they are relatively unique interactions, so it doesn't seem practical to start with an off-the-shelf widget library (jQuery UI, for isntance)
  • we need to support a wide range of browsers/mobile OSes

The team seems happy to go down the jQuery path, which I am happy about. The next question is which flavor? What do I need to consider to decide if we should go with a minimum jQuery library or to go with jQuery Mobile.

Perhaps a better way to ask the question: aside from the pre-built UI components in jQuery Mobile, are there advantages to using jQuery mobile over jQuery in the mobile space?

UPDATE:

I think I have a better way to ask this question. I'd like to use the 'stripped down' version of jQuery but have the touch-events of jQuery Mobile (but don't need the whole jQuery Mobile UI layer). Based on that, what's the approach I should be taking?

I like having the touch-centric events of jQuery Mobile, but won't be using any of the default UI elements/framework. I like the fact that one can use jQuery sans any UI elements, but it doesn't have the touch events (or does it?)

If you don't use the built-in UI components, the biggest things that you gain in jQuery Mobile are the new events. There are events for things like gestures, taps, and orientation changes.

See: http://jquerymobile.com/demos/1.0a4.1/docs/api/events.html

You also gain a ton of built-in CSS classes that define things like screen size, platform, and orientation.

I do recommend that you at least look at the pre-built components (especially for menus) as they are good looking and drastically decrease development time. There is also a CSS stylesheet (which admittedly seems weird if you are used to non-mobile jQuery) which helps format your page for mobile devices. If you don't use the pre-built components you are really missing out on a lot of jQuery Mobile.

Keep in mind that jQuery Mobile is in Alpha so there will be bugs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM