jquery mobile ui

19
jQuery Mobile Howard 2014/03/21

Upload: learningtech

Post on 15-May-2015

331 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: jQuery Mobile UI

jQuery MobileHoward 2014/03/21

Page 2: jQuery Mobile UI

Introduction

jQuery Mobile is a touch-friendly UI framework built on jQuery Core that works across all popular mobile, tablet and desktop platforms.

Page 3: jQuery Mobile UI

Mobile page structure <!DOCTYPE html>

In the head, references to jQuery, jQuery Mobile and the mobile theme CSS are all required to start things off.

Page 4: jQuery Mobile UI

Viewport meta tag <meta name="viewport" content="width=device-width, initial-

scale=1">

Page 5: jQuery Mobile UI

Inside the body: Pages

Within the "page" container, any valid HTML markup can be used, but for typical pages in jQuery Mobile, the immediate children of a "page" are divs with data-role="header” class="ui-content” data-role="footer”

Page 6: jQuery Mobile UI

Inside the body: Pages

Page 7: jQuery Mobile UI

Listview

A listview is coded as a simple unordered list (ul) or ordered list (ol) with a data-role="listview" attribute and has a wide range of features.

Page 8: jQuery Mobile UI

Listview - Inset

Adding the data-inset="true" attribute to the list (ul or ol), applies the inset appearance which is useful for mixing a listview with other content on a page.

Page 9: jQuery Mobile UI

Listview - Filter

data-filter

data-filter-placeholder

Page 10: jQuery Mobile UI

Listview - List dividers

data-role="list-divider"

Page 11: jQuery Mobile UI

Listview - Count bubbles

ui-li-count

Page 12: jQuery Mobile UI

Listview - Formatted content

Supplemental information can be added to the right of each list item by wrapping content in an element with a class of ui-li-aside

Page 13: jQuery Mobile UI

Grids

Page 14: jQuery Mobile UI

Grids

Page 15: jQuery Mobile UI

Icons jQuery Mobile provides a number of icons that can be used by

applying a data-icon attribute or a ui-icon- class to a suitable widget.

Page 16: jQuery Mobile UI

Event - mobileinit

This event is triggered after jQuery Mobile has finished loading, but before it has started enhancing the start page.

Page 17: jQuery Mobile UI

Event - pageinit

Triggered on the page being initialized, after initialization occurs.

Page 18: jQuery Mobile UI

tap

Triggered after a quick, complete touch event.

Page 19: jQuery Mobile UI

Reference

http://demos.jquerymobile.com/1.4.2/

http://msdn.microsoft.com/zh-tw/hh875190.aspx