JQuery Mobile
Encyclopedia
jQuery Mobile is a touch-optimized web framework (additionally known as a JavaScript library
JavaScript library
A JavaScript library is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies....

 or a mobile framework) currently being developed by the jQuery
JQuery
jQuery is a cross-browser JavaScript library designed to simplify the client-side scripting of HTML. It was released in January 2006 at BarCamp NYC by John Resig...

 project team. The development focuses on creating a framework compatible
Cross-browser
Cross-browser refers to the ability for a website, web application, HTML construct or client-side script to support all the web browsers. The term cross-browser is often confused with multi-browser...

 with a wide variety of smartphone
Smartphone
A smartphone is a high-end mobile phone built on a mobile computing platform, with more advanced computing ability and connectivity than a contemporary feature phone. The first smartphones were devices that mainly combined the functions of a personal digital assistant and a mobile phone or camera...

s and tablet
Tablet
A tablet is a pharmaceutical dosage form. It comprises a mixture of active substances and excipients, usually in powder form, pressed or compacted from a powder into a solid dose...

s, made necessary by the growing-but-heterogenous tablet and smartphone market. The JQuery Mobile framework is compatible with other mobile app frameworks and platforms such as PhoneGap
PhoneGap
PhoneGap is an open-source mobile development framework developed by Nitobi Software. It enables software programmers to build applications for mobile devices using JavaScript, HTML5 and CSS3, instead of often less-known languages such as Objective-C...

, Worklight and more.

Example usage


$('div').live('tap', function(event){
alert('You touched the element');
});

A basic example

Every website using jquery mobile (jqm) is more or less built like the following example. The first step is to link to the jqm libraries and stylesheet (they can also be downloaded and hosted locally but it's recommended to link to the files hosted on the jQuery CDN).
In the body you can see divs with an attribute called "data-role", this attribute is what tells jqm what is inside this div and how it should look like. A div with the data-role "page" represents what the user will experience as one "website". A page normally (but not necessarily - any html is allowed within the page div) has a "header", a "footer" and "content".
One html document can contain more then one "page" element thus more than one "website". This way it is only necessary to load one file including multiple pages. One page can link to another page within the same file using "#" plus its id (e.g. href="#second").

In the example below two other data- attributes are used. The "data-theme" attribute tells jqm what theme to use. The "data-add-back-btn" adds a back button to the page if set to "true".





Page Title









Mobile browser support

Platform Version Native PhoneGap
PhoneGap
PhoneGap is an open-source mobile development framework developed by Nitobi Software. It enables software programmers to build applications for mobile devices using JavaScript, HTML5 and CSS3, instead of often less-known languages such as Objective-C...

Opera Mobile
Opera Mobile
Opera Mobile is a web browser for smartphones and PDA's developed by the Opera Software company. The first version was released in 2000 for the Psion Series 7 and netBook. Today, it is available for a variety of devices that run on Android, S60, Windows Mobile, Maemo , and MeeGo...

Opera Mini
Opera Mini
Opera Mini is a web browser designed primarily for mobile phones, smartphones and personal digital assistants. Until version 4 it used the Java ME platform, requiring the mobile device to run Java ME applications. From version 5 it is also available as a native application for Android, iOS, Symbian...

Fennec Ozone Netfront
NetFront
NetFront Browser is a mobile browser for embedded devices, developed by Access Co. Ltd. of Japan, and was designed to function as an embedded browser....

0.9 8.5 8.65 9.5 10.0 4.0 5.0 1.0 1.1* 0.9 4.0
iOS
IOS
iOS is an operating system for iPad, iPhone, iPod Touch, and Apple TV.IOS may also refer to:-Companies and organisations:* Illinois Ornithological Society, American state-based bird club...

v2.2.1
v3.1.3, v3.2
v4.0
Symbian S60
S60 (software platform)
The S60 Platform is a software platform for mobile phones that runs on Symbian OS. It was created by Nokia, who made the platform open source and contributed it to the Symbian Foundation. S60 has been used by mobile device manufacturers including Siemens mobile, Lenovo, LG Electronics, Panasonic...

v3.1, v3.2
v5.0
Symbian UIQ
UIQ
UIQ by UIQ Technology is a software platform based upon Symbian OS. Essentially this is a graphical user interface layer that provides additional components to the core OS, to enable the development of feature-rich mobile phones that are open to expanded capabilities through third-party...

v3.0, v3.1
v3.2
Symbian Platform
Symbian
Symbian is a mobile operating system and computing platform designed for smartphones and currently maintained by Accenture. The Symbian platform is the successor to Symbian OS and Nokia Series 60; unlike Symbian OS, which needed an additional user interface system, Symbian includes a user...

v.3.0
BlackBerry OS
BlackBerry OS
BlackBerry OS is a proprietary mobile operating system, developed by Research In Motion for its BlackBerry line of smartphone handheld devices...

v4.5
v4.6, v4.7
v5.0
v6.0
Android v1.5, v1.6
v2.1
v2.2
Windows Mobile
Windows Mobile
Windows Mobile is a mobile operating system developed by Microsoft that was used in smartphones and Pocket PCs, but by 2011 was rarely supplied on new phones. The last version is "Windows Mobile 6.5.5"; it is superseded by Windows Phone, which does not run Windows Mobile software.Windows Mobile is...

v6.1
v6.5.1
v7.0
webOS 1.4.1
bada
Bada
Bada is a South Korean K-pop singer. Her birth name is Choi Sung-hee. Bada studied Korean traditional vocal music at Dankook University. As the former lead vocal from the now defunct S.E.S., Bada has released three solo albums and two singles. Before the release of her third album, Bada started a...

1.0
Maemo
Maemo
Maemo is a software platform developed by the Maemo community for smartphones and Internet tablets. It is based on the Debian Linux distribution, but has no relation to it...

5.0
MeeGo
MeeGo
MeeGo is a Linux-based open source mobile operating system project. Primarily targeted at mobile devices and information appliances in the consumer electronics market, MeeGo is designed to act as an operating system for hardware platforms such as netbooks, entry-level desktops, nettops, tablet...

1.1*


Key:
  • A browser that’s capable of, at minimum, utilizing media queries (a requirement for jQuery Mobile). These browsers will be actively tested against, but may not receive the full capabilities of jQuery Mobile.
  • A capable browser that doesn’t have enough market share to warrant day-to-day testing. Bug fixes will still be applied to help these browsers.
  • A browser that is not capable of utilizing media queries. They will not be provided any jQuery Mobile scripting or CSS (falling back to plain HTML and simple CSS).
  • * - Upcoming browser. This browser is not yet released but is in alpha/beta testing.


(Source: from the jQuery Mobile website)

Release history

Release date Version number
October 26 2010 1.0a1
November 12, 2010 1.0a2
February 4 2011 1.0a3
March 31 2011 1.0a4
April 7 2011 1.0a4.1
June 20 2011 1.0b1
August 3 2011 1.0b2
September 29 2011 1.0 RC1
October 19 2011 1.0 RC2
November 13 2011 1.0 RC3
November 16 2011 1.0

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK