SlideShare a Scribd company logo
jqmdesigner.appspot.com
What is jQuery Mobile?
jQuery + Mobile
jQuery Mobile
=
So simple, we all know it!
But, What is jQuery Mobile? Can we eat it?
Features
Powerful Ajax-powered
navigation system
HTML5 Markup-driven
configuration
Built on jQuery core
Responsive design
Progressive enhancement
Touch and mouse
event support
Lightweight size
Compatible with all major mobile,
tablet, e-reader & desktop platforms
Unified UI widgets
However, I heard that jQuery Mobile is fat
jQuery Mobile Version 1.4.3
Significantly improved performance than ever
feel jQuery Mobile
http://demos.jquerymobile.com/1.4.2/
Let’s Learn jQuery Mobile!
<link rel="stylesheet" href="jquery.mobile.min.css" />
<script src="jquery.min.js"></script>
<script src="jquery.mobile.min.js"></script>
jQuery Mobile preloaded program
<head>
<title>jQuery Mobile</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile.min.css" />
<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>header</h1>
</div>
<div class="ui-content">
<p>content</p>
</div>
<div data-role="footer">
<h4>footer</h4>
</div>
</div>
</body>
First step
<div id="page1" data-role="page">
<div role="main" class="ui-content"></div>
</div>
<div id="page2" data-role="page">
<div role="main" class="ui-content"></div>
</div>
<div id="page3" data-role="page">
<div role="main" class="ui-content"></div>
</div>
JQuery Mobile is usually a multiple page
However, only one of which is displayed,
page id must be separated
page
page Feel Page on EZoApp
http://goo.gl/EmXUY9
★ Use <href>, switch directly to the specified "Page Id"
★ Using "data-transition" set the transition effect
★ Set data-rel = "back" to return with the same effect
page
transition
<a href="#pageID" data-transition="效果"></a>
★ You can also use javascript to do the switch
★ $.mobile.changePage('#PageID');
★ $.mobile.changePage('#PageB' , {'transition':'Effect'} );
● default
● fade
● flip
● flow
● pop
● slide
● slidefade
● slideup
● slidedown
● turn
● none
<a href="#pageID" data-transition="effect"></a>
example:
http://goo.gl/xwIR0F
page
transition
Button <a href="#" class="ui-btn">Anchor</a>
<button class="ui-btn">Button</button>
Use the "class" generate button style
<a href="#" class="ui-btn ui-btn-inline">Anchor</a>
<button class="ui-btn ui-btn-inline">Button</button>
Button
ICON <button class="ui-btn ui-btn-icon-left ui-icon-action">action</button>
<button class="ui-btn ui-btn-icon-left ui-icon-alert">alert</button>
<button class="ui-btn ui-btn-icon-up ui-icon-arrow-d">arrow-d</button>
<button class="ui-btn ui-btn-icon-right ui-icon-arrow-d-l">arrow-d-l</button>
<button class="ui-btn ui-btn-icon-bottom ui-icon-arrow-d-r">arrow-d-r</button>
<button class="ui-btn ui-btn-icon-left ui-icon-arrow-l">arrow-l</button>
example:
http://goo.gl/TQxnvm
Use the "class" generate button style
Grid <div class="ui-grid-b">
<div class="ui-block-a">Block A</div>
<div class="ui-block-b">Block B</div>
<div class="ui-block-c">Block C</div>
</div>
Use "class" generates Grid, you can put the Grid in Grid
ui-grid-a : 2 columns,ui-grid-b:3 columns
ui-grid-c:4 columns,ui-grid-d:5 columns
example:
http://goo.gl/AizA2f
Input
<div class="ui-field-contain">
<label for="#text_id">Title</label>
<input type="text" name="" id="#text_id">
</div>
<div class="ui-field-contain">
<label for="#textarea_id">Title</label>
<textarea name="" id="#textarea_id"></textarea>
</div>
<div class="ui-field-contain">
<label for="#search_id">Title</label>
<input type="search" name="" id="#search_id">
</div>
example:
http://goo.gl/XOXJPH
theme Use "class" have different themes
按鈕:
<a href="#" class="ui-btn ui-btn-a">Theme A</a>
<a href="#" class="ui-btn ui-btn-b">Theme B</a>
navbar:
<div data-role="navbar">
<ul>
<li><a data-theme="a">Theme A</a></li>
<li><a data-theme="b">Theme B</a></li>
</ul>
</div>
example:
http://goo.gl/E8QcW9
Some examples of the above,
we see that "class" is very important
You must think
Of course !
The second is also very important: data attribute
2
What is data attribute?
The data-* attributes is used to store custom data private to
the page or application.
The data-* attributes gives us the ability to embed custom
data attributes on all HTML elements.
jQuery Mobile data attribute
http://api.jquerymobile.com/data-attribute/
Header
&
Footer
<div data-role="header" data-position="fixed">
<h1>header</h1>
</div>
<div data-role="footer" data-position="fixed">
<h4>footer</h4>
</div>
example:
http://goo.gl/YpuDEY
Navbar <div data-role="navbar">
<ul>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
</ul>
</div>
example:
http://goo.gl/3nwwe1
Radio
button
<form>
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Horizontal:</legend>
<input type="radio" name="radio-choice-h-2" id="radio-choice-h-2a"
value="on" checked="checked">
<label for="radio-choice-h-2a">One</label>
<input type="radio" name="radio-choice-h-2" id="radio-choice-h-2b"
value="off">
<label for="radio-choice-h-2b">Two</label>
<input type="radio" name="radio-choice-h-2" id="radio-choice-h-2c"
value="other">
<label for="radio-choice-h-2c">Three</label>
</fieldset>
</form>
example:
http://goo.gl/Vh67Vf
Check
box
<form>
<fieldset data-role="controlgroup">
<legend>Vertical:</legend>
<input type="checkbox" name="checkbox-v-2a" id="checkbox-v-2a">
<label for="checkbox-v-2a">One</label>
<input type="checkbox" name="checkbox-v-2b" id="checkbox-v-2b">
<label for="checkbox-v-2b">Two</label>
<input type="checkbox" name="checkbox-v-2c" id="checkbox-v-2c">
<label for="checkbox-v-2c">Three</label>
</fieldset>
</form>
example:
http://goo.gl/x7vfGr
Flip
switch
<form>
<label for="flip-2">Flip toggle switch:</label>
<select name="flip-2" id="flip-2" data-
role="flipswitch" data-theme="b">
<option value="off">Off</option>
<option value="on">On</option>
</select>
</form>
example:
http://goo.gl/83Mn0z
Listview <ul data-role="listview" data-inset="true"
data-divider-theme="a">
<li data-role="list-divider">Mail</li>
<li><a href="#">Inbox</a></li>
<li><a href="#">Outbox</a></li>
<li data-role="list-
divider">Contacts</li>
<li><a href="#">Friends</a></li>
<li><a href="#">Work</a></li>
</ul>
Use "data-role" to easily create "listview (filter)"
example:
http://goo.gl/XjmWug
Popup <a href="#popupID" data-rel="popup" class="ui-btn" data-
transition="pop">Popup</a>
<div data-role="popup" id="popupID">
<p>popup 內容</p>
</div>
example:
http://goo.gl/7rcO1C
Table
<table data-role="table" id="table-column-toggle" data-
mode="columntoggle" class="ui-responsive table-stroke">
<thead>
內容省略
</thead>
<tbody>
內容省略
</tbody>
</table>
http://goo.gl/pMJlkP
(columntoggle / Reflow)
Slide
Panel
<div id="left-menu" data-role="panel" data-position="left">
left menu
</div>
<div id="right-menu" data-role="panel" data-
position="right">
right menu
</div>
It is like App slider menu
example:
http://goo.gl/jM6sU3
How to make "jQuery Mobile" work?
How ?
Events
Page
(function (){
$(document).on( "pageinit" , "#pageID" , function(){
// Page first loads will be executed
});
})()
(function (){
$(document).on( "pageshow" , "#pageID" , function(){
// Will be executed after the page is displayed
});
})()
http://goo.gl/0Zwgnd
$('#id').on('tap', function () {});
$('#id').on('taphold', function () {});
$('#id').on('swipe', function () {});
$('#id').on('swipeleft', function () {});
$('#id').on('swiperight', function () {});
Five kinds of pages touch events
http://goo.gl/S5bJNq
Events
Touch
$(window).on('orientationchange', function (event) {});
Detect rotation event for mobile devices
http://goo.gl/HnE1Fe
Events
orientationchange
After a series of presentations
Everyone should understand a little jQuery Mobile
right?
? ? ? ? ?
Let's look at some examples of jQuery Mobile
Example 1 :
Change font size
http://goo.gl/ov5WEf
http://goo.gl/ppFIWB
Example 2 :
Palette
http://goo.gl/wiJ2BX
Example 3 :
Ordering System
Example 4 :
EZoApp Map
http://goo.gl/UZp0Vb
The above is a basic introduction to jQuery Mobile
If you are interested, you can learn more on the official website
http://jquerymobile.com/
Or use EZoApp
http://jqmdesigner.appspot.com/
Thank you

More Related Content

PPTX
Introduction to jQuery Mobile
PPTX
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
PDF
Django の認証処理実装パターン / Django Authentication Patterns
PDF
jQuery Mobile: Progressive Enhancement with HTML5
PPTX
jQuery Mobile - Desenvolvimento para dispositivos móveis
PDF
Overview on jQuery mobile
PPT
Desenvolvimento web com jQuery Mobile
TXT
Xxx
Introduction to jQuery Mobile
J Query (Complete Course) by Muhammad Ehtisham Siddiqui
Django の認証処理実装パターン / Django Authentication Patterns
jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile - Desenvolvimento para dispositivos móveis
Overview on jQuery mobile
Desenvolvimento web com jQuery Mobile
Xxx

What's hot (20)

PPTX
Jquery mobile
PDF
Enjoy the vue.js
PDF
Vue.js for beginners
PPTX
Introduction to Jquery
PDF
Angular JS blog tutorial
PDF
Djangoアプリのデプロイに関するプラクティス / Deploy django application
PDF
WordPress Admin UI - Future Proofing Your Admin Pages
PPTX
ChocolateChip-UI
PPTX
Introduction to the jQuery mobile framework
PDF
Jquery Cheatsheet
PDF
Fundamental JQuery
PDF
The Point of Vue - Intro to Vue.js
PDF
Secure WordPress Development Practices
PPTX
jQuery Mobile
PDF
jQueryMobile Jump Start
PDF
What Web Developers Need to Know to Develop Windows 8 Apps
PPTX
Introduction à AngularJS
PDF
Desenvolvimento web com Ruby on Rails (parte 6)
PPTX
jQuery Conference Chicago - September 2014
PDF
jQuery in the [Aol.] Enterprise
Jquery mobile
Enjoy the vue.js
Vue.js for beginners
Introduction to Jquery
Angular JS blog tutorial
Djangoアプリのデプロイに関するプラクティス / Deploy django application
WordPress Admin UI - Future Proofing Your Admin Pages
ChocolateChip-UI
Introduction to the jQuery mobile framework
Jquery Cheatsheet
Fundamental JQuery
The Point of Vue - Intro to Vue.js
Secure WordPress Development Practices
jQuery Mobile
jQueryMobile Jump Start
What Web Developers Need to Know to Develop Windows 8 Apps
Introduction à AngularJS
Desenvolvimento web com Ruby on Rails (parte 6)
jQuery Conference Chicago - September 2014
jQuery in the [Aol.] Enterprise
Ad

Viewers also liked (20)

PDF
5ο γυμνάσιο ν. ιωνίας
PDF
1. Μεταναστευτικό Αιγαίο 2. Ανθρωπιά υπό εξαφάνιση
PPT
Ο κήπος του σχολείου μας
PPT
SRISAISEVASANSTHAN
PPTX
架站前一定要上的10堂課 ch3
PPT
το δελφινοκόριτσο
PPT
Από το Ταίναρο έως τη Θράκη : Φύση, αρχαία θέατρα και στάδια, με πνοή και μερ...
PPTX
Σχολικοί αγρότες
PPTX
JQuery Mobile 框架介紹與使用 20140713
PPT
Srisai ppt
PDF
Lead Generation WP
PPT
Rematia teliko
PDF
Ανάβρυτα-Δάσος Συγγρού. Δρόμοι του νερού
PPTX
Bilaspur Tourism
PPTX
περιβαλλοντική 2012 2013
PPT
Походження людини
PDF
Yahoo
PDF
εργασια συνολική Oryktos ploutos metallevmata 3o gym kifisias 2012 2013
PDF
5ο γυμνασιο Αμαρουσίου - Δημιουργία λαχανόκηπου
PDF
Intuit
5ο γυμνάσιο ν. ιωνίας
1. Μεταναστευτικό Αιγαίο 2. Ανθρωπιά υπό εξαφάνιση
Ο κήπος του σχολείου μας
SRISAISEVASANSTHAN
架站前一定要上的10堂課 ch3
το δελφινοκόριτσο
Από το Ταίναρο έως τη Θράκη : Φύση, αρχαία θέατρα και στάδια, με πνοή και μερ...
Σχολικοί αγρότες
JQuery Mobile 框架介紹與使用 20140713
Srisai ppt
Lead Generation WP
Rematia teliko
Ανάβρυτα-Δάσος Συγγρού. Δρόμοι του νερού
Bilaspur Tourism
περιβαλλοντική 2012 2013
Походження людини
Yahoo
εργασια συνολική Oryktos ploutos metallevmata 3o gym kifisias 2012 2013
5ο γυμνασιο Αμαρουσίου - Δημιουργία λαχανόκηπου
Intuit
Ad

Similar to jQuery Mobile Introduction ( demo on EZoapp ) (20)

PDF
iWebkit
PDF
Vue.js - zastosowanie i budowa komponentów
PDF
QCon 2015 - Thinking in components: A new paradigm for Web UI
ODP
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
PDF
Angular js quickstart
DOCX
multiple views and routing
PDF
Magento20100807
PPTX
jQuery Mobile
PDF
Once Source to Rule Them All
PDF
Understanding form helpers
PDF
HTML5 and the dawn of rich mobile web applications pt 2
PDF
Jquery mobile2
PDF
HTML5 New and Improved
PDF
Building iPhone Web Apps using "classic" Domino
PDF
Your Custom WordPress Admin Pages Suck
PPTX
Getting to Know Bootstrap for Rapid Web Development
PDF
jQuery UI and Plugins
PPTX
PPTX
JQuery Mobile UI
PPTX
Bootstrap [part 2]
iWebkit
Vue.js - zastosowanie i budowa komponentów
QCon 2015 - Thinking in components: A new paradigm for Web UI
Nagios Conference 2014 - Troy Lea - JavaScript and jQuery - Nagios XI Tips, T...
Angular js quickstart
multiple views and routing
Magento20100807
jQuery Mobile
Once Source to Rule Them All
Understanding form helpers
HTML5 and the dawn of rich mobile web applications pt 2
Jquery mobile2
HTML5 New and Improved
Building iPhone Web Apps using "classic" Domino
Your Custom WordPress Admin Pages Suck
Getting to Know Bootstrap for Rapid Web Development
jQuery UI and Plugins
JQuery Mobile UI
Bootstrap [part 2]

Recently uploaded (20)

PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
KodekX | Application Modernization Development
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPT
Teaching material agriculture food technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Encapsulation_ Review paper, used for researhc scholars
Reach Out and Touch Someone: Haptics and Empathic Computing
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
20250228 LYD VKU AI Blended-Learning.pptx
Electronic commerce courselecture one. Pdf
NewMind AI Weekly Chronicles - August'25 Week I
Building Integrated photovoltaic BIPV_UPV.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
KodekX | Application Modernization Development
The Rise and Fall of 3GPP – Time for a Sabbatical?
Understanding_Digital_Forensics_Presentation.pptx
Network Security Unit 5.pdf for BCA BBA.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
sap open course for s4hana steps from ECC to s4
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Teaching material agriculture food technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Unlocking AI with Model Context Protocol (MCP)
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx

jQuery Mobile Introduction ( demo on EZoapp )

  • 2. What is jQuery Mobile?
  • 4. So simple, we all know it!
  • 5. But, What is jQuery Mobile? Can we eat it?
  • 6. Features Powerful Ajax-powered navigation system HTML5 Markup-driven configuration Built on jQuery core Responsive design Progressive enhancement Touch and mouse event support Lightweight size Compatible with all major mobile, tablet, e-reader & desktop platforms Unified UI widgets
  • 7. However, I heard that jQuery Mobile is fat
  • 8. jQuery Mobile Version 1.4.3 Significantly improved performance than ever
  • 10. Let’s Learn jQuery Mobile!
  • 11. <link rel="stylesheet" href="jquery.mobile.min.css" /> <script src="jquery.min.js"></script> <script src="jquery.mobile.min.js"></script> jQuery Mobile preloaded program
  • 12. <head> <title>jQuery Mobile</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile.min.css" /> <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile.min.js"></script> </head> <body> <div data-role="page"> <div data-role="header"> <h1>header</h1> </div> <div class="ui-content"> <p>content</p> </div> <div data-role="footer"> <h4>footer</h4> </div> </div> </body> First step
  • 13. <div id="page1" data-role="page"> <div role="main" class="ui-content"></div> </div> <div id="page2" data-role="page"> <div role="main" class="ui-content"></div> </div> <div id="page3" data-role="page"> <div role="main" class="ui-content"></div> </div> JQuery Mobile is usually a multiple page However, only one of which is displayed, page id must be separated page
  • 14. page Feel Page on EZoApp http://goo.gl/EmXUY9
  • 15. ★ Use <href>, switch directly to the specified "Page Id" ★ Using "data-transition" set the transition effect ★ Set data-rel = "back" to return with the same effect page transition <a href="#pageID" data-transition="效果"></a> ★ You can also use javascript to do the switch ★ $.mobile.changePage('#PageID'); ★ $.mobile.changePage('#PageB' , {'transition':'Effect'} );
  • 16. ● default ● fade ● flip ● flow ● pop ● slide ● slidefade ● slideup ● slidedown ● turn ● none <a href="#pageID" data-transition="effect"></a> example: http://goo.gl/xwIR0F page transition
  • 17. Button <a href="#" class="ui-btn">Anchor</a> <button class="ui-btn">Button</button> Use the "class" generate button style <a href="#" class="ui-btn ui-btn-inline">Anchor</a> <button class="ui-btn ui-btn-inline">Button</button>
  • 18. Button ICON <button class="ui-btn ui-btn-icon-left ui-icon-action">action</button> <button class="ui-btn ui-btn-icon-left ui-icon-alert">alert</button> <button class="ui-btn ui-btn-icon-up ui-icon-arrow-d">arrow-d</button> <button class="ui-btn ui-btn-icon-right ui-icon-arrow-d-l">arrow-d-l</button> <button class="ui-btn ui-btn-icon-bottom ui-icon-arrow-d-r">arrow-d-r</button> <button class="ui-btn ui-btn-icon-left ui-icon-arrow-l">arrow-l</button> example: http://goo.gl/TQxnvm Use the "class" generate button style
  • 19. Grid <div class="ui-grid-b"> <div class="ui-block-a">Block A</div> <div class="ui-block-b">Block B</div> <div class="ui-block-c">Block C</div> </div> Use "class" generates Grid, you can put the Grid in Grid ui-grid-a : 2 columns,ui-grid-b:3 columns ui-grid-c:4 columns,ui-grid-d:5 columns example: http://goo.gl/AizA2f
  • 20. Input <div class="ui-field-contain"> <label for="#text_id">Title</label> <input type="text" name="" id="#text_id"> </div> <div class="ui-field-contain"> <label for="#textarea_id">Title</label> <textarea name="" id="#textarea_id"></textarea> </div> <div class="ui-field-contain"> <label for="#search_id">Title</label> <input type="search" name="" id="#search_id"> </div> example: http://goo.gl/XOXJPH
  • 21. theme Use "class" have different themes 按鈕: <a href="#" class="ui-btn ui-btn-a">Theme A</a> <a href="#" class="ui-btn ui-btn-b">Theme B</a> navbar: <div data-role="navbar"> <ul> <li><a data-theme="a">Theme A</a></li> <li><a data-theme="b">Theme B</a></li> </ul> </div> example: http://goo.gl/E8QcW9
  • 22. Some examples of the above, we see that "class" is very important
  • 24. Of course ! The second is also very important: data attribute 2
  • 25. What is data attribute?
  • 26. The data-* attributes is used to store custom data private to the page or application. The data-* attributes gives us the ability to embed custom data attributes on all HTML elements. jQuery Mobile data attribute http://api.jquerymobile.com/data-attribute/
  • 27. Header & Footer <div data-role="header" data-position="fixed"> <h1>header</h1> </div> <div data-role="footer" data-position="fixed"> <h4>footer</h4> </div> example: http://goo.gl/YpuDEY
  • 28. Navbar <div data-role="navbar"> <ul> <li><a href="#">One</a></li> <li><a href="#">Two</a></li> </ul> </div> example: http://goo.gl/3nwwe1
  • 29. Radio button <form> <fieldset data-role="controlgroup" data-type="horizontal"> <legend>Horizontal:</legend> <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2a" value="on" checked="checked"> <label for="radio-choice-h-2a">One</label> <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2b" value="off"> <label for="radio-choice-h-2b">Two</label> <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2c" value="other"> <label for="radio-choice-h-2c">Three</label> </fieldset> </form> example: http://goo.gl/Vh67Vf
  • 30. Check box <form> <fieldset data-role="controlgroup"> <legend>Vertical:</legend> <input type="checkbox" name="checkbox-v-2a" id="checkbox-v-2a"> <label for="checkbox-v-2a">One</label> <input type="checkbox" name="checkbox-v-2b" id="checkbox-v-2b"> <label for="checkbox-v-2b">Two</label> <input type="checkbox" name="checkbox-v-2c" id="checkbox-v-2c"> <label for="checkbox-v-2c">Three</label> </fieldset> </form> example: http://goo.gl/x7vfGr
  • 31. Flip switch <form> <label for="flip-2">Flip toggle switch:</label> <select name="flip-2" id="flip-2" data- role="flipswitch" data-theme="b"> <option value="off">Off</option> <option value="on">On</option> </select> </form> example: http://goo.gl/83Mn0z
  • 32. Listview <ul data-role="listview" data-inset="true" data-divider-theme="a"> <li data-role="list-divider">Mail</li> <li><a href="#">Inbox</a></li> <li><a href="#">Outbox</a></li> <li data-role="list- divider">Contacts</li> <li><a href="#">Friends</a></li> <li><a href="#">Work</a></li> </ul> Use "data-role" to easily create "listview (filter)" example: http://goo.gl/XjmWug
  • 33. Popup <a href="#popupID" data-rel="popup" class="ui-btn" data- transition="pop">Popup</a> <div data-role="popup" id="popupID"> <p>popup 內容</p> </div> example: http://goo.gl/7rcO1C
  • 34. Table <table data-role="table" id="table-column-toggle" data- mode="columntoggle" class="ui-responsive table-stroke"> <thead> 內容省略 </thead> <tbody> 內容省略 </tbody> </table> http://goo.gl/pMJlkP (columntoggle / Reflow)
  • 35. Slide Panel <div id="left-menu" data-role="panel" data-position="left"> left menu </div> <div id="right-menu" data-role="panel" data- position="right"> right menu </div> It is like App slider menu example: http://goo.gl/jM6sU3
  • 36. How to make "jQuery Mobile" work? How ?
  • 37. Events Page (function (){ $(document).on( "pageinit" , "#pageID" , function(){ // Page first loads will be executed }); })() (function (){ $(document).on( "pageshow" , "#pageID" , function(){ // Will be executed after the page is displayed }); })() http://goo.gl/0Zwgnd
  • 38. $('#id').on('tap', function () {}); $('#id').on('taphold', function () {}); $('#id').on('swipe', function () {}); $('#id').on('swipeleft', function () {}); $('#id').on('swiperight', function () {}); Five kinds of pages touch events http://goo.gl/S5bJNq Events Touch
  • 39. $(window).on('orientationchange', function (event) {}); Detect rotation event for mobile devices http://goo.gl/HnE1Fe Events orientationchange
  • 40. After a series of presentations Everyone should understand a little jQuery Mobile right? ? ? ? ? ?
  • 41. Let's look at some examples of jQuery Mobile
  • 42. Example 1 : Change font size http://goo.gl/ov5WEf
  • 45. Example 4 : EZoApp Map http://goo.gl/UZp0Vb
  • 46. The above is a basic introduction to jQuery Mobile If you are interested, you can learn more on the official website http://jquerymobile.com/