Monday, May 6, 2013

jQuery vs jQueryMobile

I just had a very interesting interview and had a question. How jQueryMobile differs from regular jQuery? I was quite interesting to me, because when I worked on mobile sites I did not have even time to think about it. Now it's time to search for the answer.

Per my research I found:
 - "jQuery is purely designed to simplify and standardise scripting across browsers. It focusses on the low-level stuff: creating elements, manipulating the DOM, managing attributes, performing HTTP requests, etc.

jQueryUI is a set of user interface components & features built on top of jQuery (i.e. it needs jQuery to work): buttons, dialog boxes, sliders, tabs, more advanced animations, drag/drop functionality.
jQuery and jQueryUI are both designed to be 'added' to your site (desktop or mobile) - if you want to add a particular feature, jQuery or jQueryUI might be able to help.

jQuery Mobile, however, is a full framework. It's intended to be your starting point for a mobile site. It makes use of features of both jQuery and jQueryUI to provide both UI components and API features for building mobile-friendly sites. You can still use as much or as little of it as you like, but jQuery Mobile can control the whole viewport in a mobile-friendly way if you let it.

Another major difference is that jQuery and jQueryUI aim to be a layer on top of your HTML and CSS. You should be able to just leave your markup alone and enhance it with jQuery. However, jQuery Mobile provides ways to define where you want components to appear using HTML alone - e.g. (from the jQuery Mobile site):" -

It's truly true, you never know when you're going to learn. I LEARNED!

No comments:

Post a Comment