ArticleslgStudy

science

JQuery Mobile

JQuery Mobile is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand JQuery Mobile rather than just read about it. In short: jQuery Mobile is a touch-optimized web framework (also known as a mobile framework), specifically a JavaScript library, developed by the jQuery project team. The development focuses on creating a framework compatible with many smartphones and tablet computers, made necessary by the growing but heterogeneous tablet and smartphone market.

JQuery Mobile — main illustration
JQuery Mobile — illustration

Key takeaways

  • JQuery Mobile belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect JQuery Mobile to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of JQuery Mobile from memory before moving on to harder problems.

Reference excerpt

jQuery Mobile is a touch-optimized web framework (also known as a mobile framework), specifically a JavaScript library, developed by the jQuery project team. The development focuses on creating a framework compatible with many smartphones and tablet computers, made necessary by the growing but heterogeneous tablet and smartphone market. The jQuery Mobile framework is consistent with other mobile app frameworks and platforms such as PhoneGap, Worklight, etc. As of October 7, 2021 jQuery Mobile has been deprecated.

Features Compatible with all major desktop browsers as well as all major mobile platforms, including Android, iOS, Windows Phone, Blackberry, WebOS, Symbian. Built on top of jQuery core so it has a minimal learning curve for people already familiar with jQuery syntax. Theming framework that allows creation of custom themes. Limited dependencies and lightweight to optimize speed. The same underlying codebase will automatically scale to any screen. HTML5-driven configuration for laying out pages with minimal scripting. AJAX-powered navigation with animated page transitions that provides ability to create semantic URLs through pushState. UI widgets that are touch-optimized and platform-agnostic. (Source: from the jQuery Mobile website)

Example usage

A basic example What follows is a basic jQuery Mobile project utilizing HTML5 semantic elements. It is important to link to the jQuery and jQuery Mobile JavaScript libraries, and stylesheet (the files can be downloaded and hosted locally, but it is recommended to link to the files hosted on the jQuery CDN). A screen of the project is defined by a section HTML5 element, and data-role of page. Note that data-role is an example of the HTML5 data attribute, in this case being defined by jQuery Mobile. A page may have header and footer elements with data-role of header and footer, respectively. In between, there may be an article element, with a role of main and a class of ui-content. Lastly, a nav element, with data-role of navbar may be present. One HTML document can contain more than one section element, and thus more than one screenful of content. This way it is only necessary to load one file which includes multiple pages of content. One page can link to another page within the same file by referencing the page's id attribute (e.g. href="#second"). In the example below, two other data- attributes are used. The data-theme attribute tells the browser what theme to render. The data-add-back-btn attribute adds a back button to the page if set to true. Lastly, icons can be added to elements via the data-icon attribute. jQuery Mobile has fifty commonly used icons built in. A brief explanation of the Data Attributes used in this example: data-role – Specifies the role of the element, such as header, content, footer, etc. data-theme – Specifies which design theme to use for elements within a container. Can be set to: a or b. data-position – Specifies whether the element should be fixed, in which case it will render at the top (for header) or bottom (for footer). data-transition – Specifies one of ten built-in animations to use when loading new pages. data-icon – Specifies one of fifty built-in icons that can be added to an element.

Theming jQuery Mobile provides a theming framework that allows developers to customize color schemes and certain CSS aspects of UI features. Developers can use the jQuery Mobile ThemeRoller application to customize these appearances and create branded experiences. After developing a theme in the ThemeRoller application, programmers can download a custom CSS file and include it in their project to use their custom theme. Each theme can contain up to 26 unique color "swatches," each of which consists of a header bar, content body, and button states. Combining different swatches allows developers to create a wider range of visual effects than they would be able to with just one swatch per theme. Switching between different swatches within a theme is as simple as adding an attribute called "data-theme" to HTML elements. The default jQuery Mobile theme comes with two different color swatches, named "a" and "b". Here is an example of how to create a toolbar with the "b" swatch:

(Source: from the jQuery Mobile website) There are already a handful of open source style themes that are developed and supported by third-party organizations. One such open source style theme is the Metro style theme that was developed and released by Microsoft Open Technologies, Inc. The Metro style theme is meant to mimic the UI of the Metro (design language) that Microsoft uses in its mobile operating systems.

Mobile browser support

Key:

A - High Quality. 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. B - Medium Quality. 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. C - Low Quality. 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)

See also

jQTouch jQuery Content adaptation DaVinci Studio iUI PhoneGap Tizen ViziApps Bootstrap JavaScript framework JavaScript library

References

Further reading

External links Official website The jQuery Project jQuery Mobile documentation and demo jQuery Mobile Framework: write less, do more jQuery Mobile C# ASP.NET By Matthew David Elgert Archived 2014-07-05 at the Wayback Machine PropertyCross, Helping you select a cross-platform mobile framework: jQuery Mobile[link removed]

Worked examples

Example 1 — a first encounter with JQuery Mobile

Start with the simplest possible case. Write down what JQuery Mobile claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to JQuery Mobile before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about JQuery Mobile ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of JQuery Mobile

In research
JQuery Mobile appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses JQuery Mobile in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
JQuery Mobile is common in secondary-school and first-year university syllabi. It links to neighbouring topics Ajax (programming), JavaScript libraries, Mobile web, so understanding it makes those chapters shorter.
In everyday life
Look for JQuery Mobile outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “JQuery Mobile” →

How to study JQuery Mobile in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what JQuery Mobile means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain JQuery Mobile out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is JQuery Mobile in simple terms?

jQuery Mobile is a touch-optimized web framework (also known as a mobile framework), specifically a JavaScript library, developed by the jQuery project team. The development focuses on creating a framework compatible with many smartphones and tablet computers, made necessary by the growing but hete…

Why does JQuery Mobile matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study JQuery Mobile?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on JQuery Mobile.

Tags

  • Ajax (programming)
  • JavaScript libraries
  • Mobile web
  • Responsive web design
  • Web frameworks

Keep exploring