Showing posts with label jQuery Mobile. Show all posts
Showing posts with label jQuery Mobile. Show all posts

Monday, January 21, 2013

jQuery Mobile 1.3.0 beta released!

jQuery Mobile 1.3.0 beta is focused on elevating responsive web design (RWD) and brings lots of cool new widgets including panels, dual handle range sliders, and two different responsive table modes. And also a lot of work on re-factoring AJAX nav system to make it easier to use and more consistent across browsers.

Source: http://jquerymobile.com/blog/2013/01/14/announcing-jquery-mobile-1-3-0-beta/

Try it now: 1.3.0 Beta demos

Saturday, September 15, 2012

jQuery Mobile 1.2.0 RC1 released!



jQuery Mobile: Touch-Optimized Web Framework for Smartphones & Tablets

A unified, HTML5-based user interface system for all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation. Its lightweight code is built with progressive enhancement, and has a flexible, easily themeable design.

Web Site: http://jquerymobile.com/

Thursday, August 2, 2012

jQuery Mobile 1.2.0 Alpha released

The jQuery Mobile 1.2.0 alpha released. This release brings a new popup widget, an autodivider option for listviews, and a host of enhancements and fixes throughout the library to make things smoother, faster, and more polished. Try the demo now!

jQuery Mobile web site: http://jquerymobile.com/

jQuery Mobile 1.2.0 Alpha



Thursday, July 12, 2012

jQuery Mobile 1.1.1 released



This is our first maintenance release for version 1.1 and it’s chock full of bug fixes and improvements based on community feedback and testing.

The most notable changes in this release are speedier page transitions and tap responsiveness on longer pages, smoother transitions in Cordova, and more polished form elements.

Alongside this release, the ThemeRoller Mobile tool has been updated to make it easy to upgrade existing themes to 1.1.1. A new downloader builder tool is now released as a public alpha and allows you to build custom versions of jQuery Mobile 1.1.1 that only include the modules you need.

Source: http://jquerymobile.com/blog/2012/07/12/jqm-1-1-1/


Wednesday, April 18, 2012

ThemeRoller for jQuery Mobile

The ThemeRoller Mobile tool makes it easy to create custom-designed themes for your mobile site or app. Just pick colors, then share your theme URL, or download the theme and drop it into your site.

Try it: http://jquerymobile.com/themeroller/

ThemeRoller


jQuery Mobile 1.1 Final released

jQuery Mobile 1.1 has been released with hundreds of improvements, big and small, to make jQuery Mobile feel faster, smoother and more polished across the board.

The most notable improvements in 1.1.0 are true fixed toolbars, completely re-vamped animated page transitions and AJAX loader, refined form element design and feature set, and improved documentation. 

Requires jQuery core 1.6.4 or 1.7.1.

Know more: http://jquerymobile.com/blog/2012/04/13/announcing-jquery-mobile-1-1-0/

Sunday, April 8, 2012

jQuery Mobile 1.1.0 RC2 Released

jQuery Mobile is a Touch-Optimized UI Framework built with jQuery and HTML5. the easiest way to build sites and apps that are accessible on all popular smartphone, tablet and desktop devices. For jQuery 1.6.4 and 1.7.1.

jQuery Mobile 1.1.0 RC2 Released, read details: http://jquerymobile.com/blog/2012/04/06/jquery-mobile-1-1-0-rc2/

Visit jQuery Mobile 1.1.0 RC2


Tuesday, March 6, 2012

jQuery Mobile 1.1.0 RC1 released

The first jQuery Mobile 1.1.0 RC1 released. This release has been a real labor of love, with hundreds of commits and tons of improvements, big and small, to make jQuery Mobile feel faster, smoother and more polished across the board.

Try it now! http://jquerymobile.com/demos/1.1.0-rc.1/

jQuery Mobile 1.1.0 RC1

Saturday, February 18, 2012

jquery-ui-map: Google maps plugin for jQuery and jQuery Mobile


The Google Map version 3 plugin for jQuery and jQM takes away some of the head aches from working with the Google Map API. Instead of having to use Google event listeners for simple events like click, you can use jQuery click events on the map and markers.

It is also very flexible, highly customizable, lightweight (3.3kB or 4kB for the full) and works out of the box with jQuery mobile. But one of its best features (atleast for SEO people) is that you can populate a map from microformats, RDFa or microdata on your site, which can be used as a fallback when a user doesn't have javascript enabled.


Project Home: jquery-ui-map

Tuesday, February 7, 2012

jQuery Mobile: Group select menu inside fieldset, vertically

Group select menu inside fieldset
<!doctype html>
<html>

<head>
<meta charset="utf-8"></meta>
<meta name = "viewport" content = "width = device-width, height = device-height" />
<title>Mobile-Web-App: Selection Menu</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>

</head>
<body>
<div data-role="page" id="home">
<div data-role="header">
<h1>jQuery Mobile: Selection Menu</h1>
</div>

<div data-role="content">

<div data-role="fieldcontain">
<fieldset data-role="controlgroup">
<legend>Month:Day:APM</legend>

<label for "month">Month:</label>
<select name="month" id="month">
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>

<label for "dayofweek">Day Of Week:</label>
<select name="dayofweek" id="dayofweek">
<option value="Sunday">Sunday</option>
<option value="Monday">Monday</option>
<option value="Tuesday">Tuesday</option>
<option value="Wednesday">Wednesday</option>
<option value="Thursday">Thursday</option>
<option value="Friday">Friday</option>
<option value="Saturday">Saturday</option>
</select>

<label for "apm">AM/PM:</label>
<select name="apm" id="apm">
<option value="AM">AM</option>
<option value="PM">PM</option>
</select>

</fieldset>
</div>

</div>

<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>

</div>

</body>
</html>



Related:
- jQuery Mobile: Horizontally grouped select menu

Monday, December 19, 2011

Footer Toolbar of jQuery Mobile

Example of using Footer Toolbar of jQuery Mobile:

Footer Toolbar of jQuery Mobile

<!DOCTYPE html>
<html>
<head>
<title>jQuery Mobile Web Page: Toolbar</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<!-- Example of Header bar -->
<div data-role="header">
<!-- Left Button -->
<a href="#home" data-icon="arrow-l">Home</a>
<!-- Title -->
<h1>Toolbar</h1>
<!-- Left Button -->
<a href="#secondpage" data-icon="arrow-r">Second</a>
</div>
<!-- End of Header bar -->

<div data-role="content">
<p>Hello jQuery Mobile Toolbar</p>
<p>it's a basic mobile web page utilize jQuery Mobile implementing Toolbar.</p>
<a href="#secondpage">Jump to Second Page</a>
</div>

<!-- Example of Footer bar -->
<div data-role="footer">
<a href="#home" data-icon="arrow-l" datarole="button">Left</a>
<a href="http://mobile-web-app.blogspot.com/" data-icon="arrow-u" data-role="button">Up</a>
<a href="#secondpage" data-icon="arrow-r" datarole="button">Right</a>
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
<!-- End of Footer bar -->

</div>

<div data-role="page" id="secondpage">
<!-- Example of Header bar -->
<div data-role="header">
<!-- Left Button -->
<a href="#home" data-icon="arrow-l">Home</a>
<!-- Title -->
<h1>Toolbar</h1>
<!-- Left Button -->
<a href="#secondpage" data-icon="arrow-r">Second</a>
</div>
<!-- End of Header bar -->

<div data-role="content">
<p>It's the SECOND PAGE</p>
<a href="#home">Back to Home Page</a>
</div>

<!-- Example of Footer bar -->
<div data-role="footer">
<a href="#home" data-icon="arrow-l" datarole="button">Left</a>
<a href="http://mobile-web-app.blogspot.com/" data-icon="arrow-u" data-role="button">Up</a>
<a href="#secondpage" data-icon="arrow-r" datarole="button">Right</a>
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
<!-- End of Footer bar -->

</div>

</body>
</html>

Sunday, December 18, 2011

Header Toolbar of jQuery Mobile

In jQuery Mobile, there are two standard types of toolbars: Headers and Footers.
  • The Header bar serves as the page title, and typically contains a page title and up to two buttons.
  • The Footer bar is usually the last element inside each mobile page, and tends to be more freeform than the header in terms of content and functionality, but typically contains a combination of text and buttons.


Example of jQuery Mobile Header bar:
Header Toolbar of jQuery Mobile

<!DOCTYPE html>
<html>
<head>
<title>jQuery Mobile Web Page: Toolbar</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<!-- Example of Toolbar -->
<!-- Left Button -->
<a href="#home" data-icon="arrow-l">Home</a>
<!-- Title -->
<h1>Toolbar</h1>
<!-- Left Button -->
<a href="#secondpage" data-icon="arrow-r">Second</a>
<!-- End of Toolbar -->
</div>
<div data-role="content">
<p>Hello jQuery Mobile Toolbar</p>
<p>it's a basic mobile web page utilize jQuery Mobile implementing Toolbar.</p>
<a href="#secondpage">Jump to Second Page</a>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

<div data-role="page" id="secondpage">
<div data-role="header">
<!-- Example of Toolbar -->
<!-- Left Button -->
<a href="#home" data-icon="arrow-l">Home</a>
<!-- Title -->
<h1>Toolbar</h1>
<!-- Left Button -->
<a href="#secondpage" data-icon="arrow-r">Second</a>
<!-- End of Toolbar -->
</div>
<div data-role="content">
<p>It's the SECOND PAGE</p>
<a href="#home">Back to Home Page</a>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

</body>
</html>



Related:
- Footer Toolbar of jQuery Mobile

Friday, December 16, 2011

Handle Slider change event

Handle Slider change event

The article "jQuery Mobile: Read value of Slider" demonstrate how to read slider value when user click on a button. It's modified to automatically detect slider change event here.

In order to detect slider change, we have to add a additional element("my-slider" in my example)surround the slider - I don't know why I can't use "slider" directly!

Then implement:
$("#my-slider").change(function() {
//...do what you want here...
});

example:
Handle Slider change event
<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content = "width = device-width, height = device-height" />
<title>jQuery Mobile: Slider</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>Slider</h1>
</div>
<div data-role="content">
<p>jQuery Mobile: Slider</p>
<div data-role="fieldcontain">
<label for="slider">Slider:</label>
<div id="my-slider">
<input type="range" name="slider" id="slider" value="0" min="0" max="100" />
</div>
<input type="button" value="Read Slider" onclick="button_clicked()" />
<p id="slider_value">0</p>
</div>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

<script>
function button_clicked(){
var SliderValue = $("#slider").val();
alert("Slider value = " + SliderValue);
}

$("#my-slider").change(function() {
var SliderValue = $("#slider").val();
$("#slider_value").text("Slider changed: " + SliderValue);
});
</script>

</body>
</html>

Thursday, December 15, 2011

Collapsible Set

Collapsible set start with the exact same markup as individual Collapsible Block. By adding a parent wrapper with a data-role="collapsible-set" attribute around a number of collapsibles, the framework will style these to looks like a visually grouped widget and make it behave like an accordion so only one section can be open at a time.
Collapsible Set
example:
<!DOCTYPE html>
<html>
<head>
<title>Basic jQuery Mobile Web Page</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>mobile-web-app</h1>
</div>
<div data-role="collapsible-set">
<div data-role="content">
<p>Collapsible Set</p>
<p>Collapsible sets start with the exact same markup as individual Collapsible Block.
By adding a parent wrapper with a data-role="collapsible-set" attribute around a number of collapsibles, the framework will style these to looks like a visually grouped widget and make it behave like an accordion so only one section can be open at a time.</p>
<div data-role="collapsible">
<H1>Collapsible block 1</H1>
<div data-role="collapsible">
<H1>Nested Collapsible block 1</H1>
<p>Content of Nested Collapsible block 1.</p>
</div>
<div data-role="collapsible">
<H1>Nested Collapsible block 2</H1>
<p>Content of Nested Collapsible block 2.</p>
</div>
</div>
<div data-role="collapsible">
<H1>Collapsible block 2</H1>
<p>Content of Collapsible Block 2</p>
</div>
</div>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

</body>
</html>

Wednesday, December 14, 2011

Nested Collapsible Block

example of nested collapsible block:

Nested Collapsible Block

<!DOCTYPE html>
<html>
<head>
<title>Basic jQuery Mobile Web Page</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>mobile-web-app</h1>
</div>
<div data-role="content">
<p>Collapsible Block</p>
<div data-role="collapsible">
<H1>Collapsible block 1</H1>
<div data-role="collapsible">
<H1>Nested Collapsible block 1</H1>
<p>Content of Nested Collapsible block 1.</p>
</div>
<div data-role="collapsible">
<H1>Nested Collapsible block 2</H1>
<p>Content of Nested Collapsible block 2.</p>
</div>
</div>
<div data-role="collapsible">
<H1>Collapsible block 2</H1>
<p>Content of Collapsible Block 2</p>
</div>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

</body>
</html>

Monday, December 12, 2011

Create collapsible block in jQuery Mobile

To create a collapsible block of content, create a container and add the data-role="collapsible" attribute.

example:
Collapsible Block

<!DOCTYPE html>
<html>
<head>
<title>Basic jQuery Mobile Web Page</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>mobile-web-app</h1>
</div>
<div data-role="content">
<p>Collapsible Block</p>
<div data-role="collapsible">
<H1>To create a collapsible block </H1>
<p>create a container and add the data-role="collapsible" attribute.</p>
</div>
<div data-role="collapsible">
<H2>Only the first h-element will be processed as header!</H2>
<H2>So, it's normal heading text!</H2>
<p>Content of Collapsible Block 2</p>
</div>
<div data-role="collapsible">
<p>You can place h-element in any where within Collapsible Block</p>
<H3>You can place h-element in any where within Collapsible Block</H3>
</div>
<div data-role="collapsible" data-collapsed="false">
<H3>Defult expanded Collapsible Block</H3>
<p>add the data-collapsed="false" attribute</p>
</div>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

</body>
</html>


Related article:
- Nested Collapsible Block
- Collapsible Set

Saturday, December 10, 2011

Apply grid layout on jQuery Mobile

To apply grid layout on jQuery Mobile, we can use ui-grid.

There are four preset configurations layouts that can be used in any situation that requires columns:
  • ui-grid-a : 2 column
  • ui-grid-b : 3 column
  • ui-grid-c : 4 column
  • ui-grid-d : 5 column


Within the grid container, child elements are assigned ui-block-a/b/c/d in a sequential manner which makes each "block" element float side-by-side, forming the grid.

Here is a example with 3 column grid:

jQuery Mobile with grid of 3 column

<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content = "width = device-width, height = device-height" />
<title>jQuery Mobile: Button Icon</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>Grid Layout</h1>
</div>
<div data-role="content">
<div class="ui-grid-b">
<div class="ui-block-a">
<a data-role="button" data-icon="arrow-l" >arrow-l</a>
<a data-role="button" data-icon="arrow-r" >arrow-r</a>
<a data-role="button" data-icon="arrow-u" >arrow-u</a>
<a data-role="button" data-icon="arrow-d" >arrow-d</a>
<a data-role="button" data-icon="delete" >delete</a>
<a data-role="button" data-icon="plus" >plus</a>
</div>
<div class="ui-block-b">
<a data-role="button" data-icon="minus" >minus</a>
<a data-role="button" data-icon="check" >check</a>
<a data-role="button" data-icon="gear" >gear</a>
<a data-role="button" data-icon="refresh" >refresh</a>
<a data-role="button" data-icon="forward" >forward</a>
<a data-role="button" data-icon="back" >back</a>
</div>
<div class="ui-block-c">
<a data-role="button" data-icon="grid" >grid</a>
<a data-role="button" data-icon="star" >star</a>
<a data-role="button" data-icon="alert" >alert</a>
<a data-role="button" data-icon="info" >info</a>
<a data-role="button" data-icon="home" >home</a>
<a data-role="button" data-icon="search" >search</a>
</div>
</div>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>

</div>

</body>
</html>

Friday, December 2, 2011

jQuery Mobile: icon position

In jQuery Mobile, the default position of icon are placed to the left of the button text. It can be overridden using the data-iconpos attribute to set ="right", "top" or "bottom".

jQuery Mobile: icon position

<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content = "width = device-width, height = device-height" />
<title>jQuery Mobile: Button Icon</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>Button Icon</h1>
</div>
<div data-role="content">
<div>
<div>
<a data-role="button" data-icon="arrow-l" >default </a>
<a data-role="button" data-icon="arrow-r" data-iconpos="right">data-iconpos="right"</a>
<a data-role="button" data-icon="arrow-u" data-iconpos="top">data-iconpos="top"</a>
<a data-role="button" data-icon="arrow-d" data-iconpos="bottom">data-iconpos="bottom"</a>
</div>
</div>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

</body>
</html>

jQuery Mobile Icons

jQuery Mobile framework provide a selected set of icons most often needed for mobile apps. It can be added using data-icon="arrow-l".

Here is a example to add icon on Button.

jQuery Mobile Icons

<!DOCTYPE html>
<html>
<head>
<meta name = "viewport" content = "width = device-width, height = device-height" />
<title>jQuery Mobile: Button Icon</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
<script src="http://code.jquery.com/jquery.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.min.js"></script>
</head>
<body>

<div data-role="page" id="home">
<div data-role="header">
<h1>Button Icon</h1>
</div>
<div data-role="content">
<div class="ui-bar" >
<div>
<a data-role="button" data-icon="arrow-l" >arrow-l</a>
<a data-role="button" data-icon="arrow-r" >arrow-r</a>
<a data-role="button" data-icon="arrow-u" >arrow-u</a>
<a data-role="button" data-icon="arrow-d" >arrow-d</a>
<a data-role="button" data-icon="delete" >delete</a>
<a data-role="button" data-icon="plus" >plus</a>
<a data-role="button" data-icon="minus" >minus</a>
<a data-role="button" data-icon="check" >check</a>
<a data-role="button" data-icon="gear" >gear</a>
<a data-role="button" data-icon="refresh" >refresh</a>
<a data-role="button" data-icon="forward" >forward</a>
<a data-role="button" data-icon="back" >back</a>
<a data-role="button" data-icon="grid" >grid</a>
<a data-role="button" data-icon="star" >star</a>
<a data-role="button" data-icon="alert" >alert</a>
<a data-role="button" data-icon="info" >info</a>
<a data-role="button" data-icon="home" >home</a>
<a data-role="button" data-icon="search" >search</a>
</div>
</div>
</div>
<div data-role="footer">
<h4><a href="http://mobile-web-app.blogspot.com/">http://mobile-web-app.blogspot.com/</a></h4>
</div>
</div>

</body>
</html>