jQuery Mobile Alpha 2 Released

Posted on by

We’re pleased to announce the second alpha release of the jQuery Mobile project. This release includes a number of bug fixes and enhancements to the original jQuery Mobile Alpha 1 release.

Overall the quality of jQuery Mobile has been greatly improved. A number of subsystems have been rewritten (both for clarity and for performance) and cross-browser compatibility has seen a marked increase in quality. We’re planning on releasing at least one more alpha (or beta) before the end of the year, followed by a final 1.0 release in January.

Demos and Documentation

jQuery Mobile 1.0 Alpha 2

All the jQuery Mobile demos and documentation can be found in the unified demo application:

This includes demos and documentation for all the changes in jQuery Mobile 1.0a2, including:

  • Events
  • API and Methods
  • Ajax Form Handling
  • URL handling and transitions
  • Global Configuration


Download

We provide CDN-hosted versions of jQuery Mobile for you to include into your site. These are already minified and compressed – and host the image files as well. It’ll likely be the fastest way to include jQuery Mobile in your site.

NOTE: jQuery Mobile 1.0 Alpha 2 requires jQuery 1.4.4.

CDN-Hosted JavaScript:

CDN-Hosted CSS:

Copy-and-Paste Snippet:

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>

More details on how this works can be found in the page and layout documentation.

If you want to host the files yourself you can download a zip of all the files:

ZIP File:

Testing

jQuery Mobile test devices
The current state of the jQuery Mobile test lab.

If you wish to help with testing of jQuery Mobile we recommend that you hop on to Github and grab the latest source. Additionally please test against the latest version of the source at our test URL and file bugs in the bug tracker:

Bug Fixes

Lots and lots of bug fixes have been made in this release – about 200 tickets have been closed since the 1.0 Alpha 1 release and we’re continuing to work strong

List Views

The performance of loading a large listview has been greatly improved. We’re seeing around a 3x improvement in speed, depending upon the platform.

Additionally you can now call refresh on a list view for when you add new items, to apply the list view styling to them.

Select Menus

The new refresh functionality has been added to select menus as well, allowing you to add the select menu styling to newly-injected items.

Additionally the accessibility of select menus has been improved, allowing your to navigate through the select menu using the keyboard (such as being able to open the select menu with the ‘enter’ key and navigate using the arrow keys).

Scrolling and Headers/Footers

The performance of page scrolling has been greatly improved – as has the performance and quality of fixed headers and footers.

Navbar Overhauled

The navbar functionality has been overhauled using the grid model work provided by the framework allowing for much greater flexibility in the design of the navbar.

URL Navigation Refactored

Much of the handling for loading new pages (via Ajax) has been overhauled and tremendously improved. The functionality has been encapsulated in a new changePage method that gives a great amount of flexibility as to how data should be loaded and how page-to-page transitions should work.

Ajax Form Handling

In addition to the automatic handling of internal links (converting them into Ajax requests and introducing smooth page-to-page transitions), Alpha 2 also handles the same functionality for forms. Form submissions will now pass through the changePage method – allowing for smooth form submission, transitions, and page loads. More information about this technique can be seen in the documentation.

jQuery UI Widget Factory

All of the relevant jQuery Mobile widgets have moved over to building off of the jQuery UI Widget Factory. This gives us the ability to have greater extensibility and methods (such as the ability to disable controls). Specifically in this release Dialog, Form Buttons, listview, collapsible, Checkbox/Radio, textinput, slider / switch, Select menu, ┬áhave all moved over to the widget factory, and we’re continuing to work on extending the methods and events those plugins provide.

Dialog

In addition to moving to the jQuery UI Widget Factory a new method for dialogs has been introduced: close (naturally, allowing you to close a dialog once open). You can call it like so: .dialog("close").

Global Configuration

jQuery Mobile now has a number of ways to override the initial configuration of a number of aspects of the framework (such as disabled Ajax-style links or forms). This can allow you to sculpt jQuery Mobile to work in situations that are more-specialized and don’t fit the complete design methodology of the framework (giving you the ability to only use a couple widgets rather than the framework as whole, for example).

Media Query Helpers

A new set of CSS classes have been introduced that are automatically updated on resize and orientationchange that you can use to scale your layout to particular devices and rotations. These are designed to work even in browsers that don’t support CSS Media Queries.

New Methods

A number of static methods have been added to make some common tasks quite simple, such as: Scrolling the page, showing the loading message, changing pages, and other tasks.

Events

The documentation for jQuery Mobile’s events has been drastically improved. jQuery Mobile publishes a number of events that can be utilized to write complex mobile applications (and can be used separately from the jQuery Mobile framework).

Thanks

For this release we would like to thank Filament Group (specifically Scott Jehl who was responsible for much of the development of the release and Todd Parker who was responsible for the design), Adobe (specifically Kin Blas who helped to fix a number of bugs and Jorge Taylor), Ben Alman (for helping to improve orientationchange), RIM (for providing us with test devices), and Nokia (for providing us with test devices).