SlideShare a Scribd company logo
1 of 13
Introduction to




                  ejlp12@gmail.com - Dec2012
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.




           If you know basic HTML, you can start building mobile sites right away.
By using hybrid mobile application tool such as Apache Cordova/Cordova then you can create
                             native installable mobile application.
jQuery Mobile features


 Pages & Dialogs, Navigation system
 Toolbars (Header & Footer bars)
 Content formating (collapsible content blocks, columns
  layout)
 Button’s (Including a set of stock icons)
 Form Controls (Slider’s, Toggles, enhanced radio,
  checkbox, etc)
 List View Control




     http://jquerymobile.com
jQuery Mobile Demo




       http://jquerymobile.com/demos/1.2.0/
Supported Devices




       Apple iOS                   Meego          Windows Phone 7
       Android                      Tizen            Symbian
      Blackberry               Samsung Bada         Palm webOS




                   http://jquerymobile.com/gbs/
Customize Theme
                                                    iOS Theme




   <link rel="stylesheet" href="css/themes/my-custom-theme.css" />


   http://jquerymobile.com/themeroller/
Customize Download


 Download only the code that you’re using
  – Minimal file size
  – Function code that are not used is not included




   http://jquerymobile.com/download-builder/
Getting started


 Components
   – jQuery Core JS
   – jQuery Mobile JS
   – jQuery Mobile CSS

                  HTML5 DOCTYPE

  <!DOCTYPE html>
  <html>                     Making widht fit to the screen
  <head>
  <title>Page Title</title>
                                                                         JQuery Mobile CSS & JS
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet"
        href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
  <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
  <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
  </head>
  <body>
  ...
  </body>
data-role Attribute
 <body>
 <div data-role="page" id="main">
  <div data-role="header">
    <h1>My Header</h1>
  </div>
  <div data-role="content">
    <p>Here is a <a href="#page2">link</a> to
     another page.</p>
  </div>
  <div data-role="footer">
     <h4>My Footer</h4>
  </div>
 </div>
 </body>


 An element that represent a jQuery Mobile widget is using HTML
 attribute data-role


 Immediate children of a "page" are divs with data-roles of "header",
 "content", and "footer".
Page navigation
 <body>
 <div data-role="page" id="foo">
  <div data-role="header"> <h1>First</h1> </div>
  <div data-role="content"> <p>I'm first Page</p>
  <p><a href="#bar">Link to second page</a></p>
 </div>

 <div data-role="page" id=“bar">
   <div data-role="header“ data-add-back-btn="true">
    <h1>Second</h1></div>
  <div data-role="content"> <p>I'm second Page</p>
  <p><a href="#foo">Link to first page</a></p>
 </div>
 </body>




  Page is basically a div identified by data-role="page" and   id

  Link to page is using element a (anchor) with id name of page div as a value of href
   attribute.

  Back button in the header can be automatically added by adding data-add-back-btn="true“
  Another button in the header can be added using anchor tag inside header div e.g. <a
  href="index.html" data-icon="check">Save</a>
Navigation bar: Navbar
 <div data-role="footer">
 <div data-role="navbar" data-iconpos="top">
 <ul>
 <li><a href="#" data-icon="home“
  class="ui-btn-active">One</a></li>
 <li><a href="#" data-icon="gear">Two</a></li>
 <li><a href="#" data-icon="info">Three</a></li>
 </ul>
 </div>
 </div>



 Navigation bar can be in header or footer
 Use ul, li and a tag
 Navigation item can be text only, icon only or both
 Standard icon without adding icon/image file can be use or use additional image/icon file.
 Default icon position is on top. Change the position of icon relative to the text using   data-
  iconpos attribute e.g. data-iconpos="bottom"

 To make a navigation item active use class="ui-btn-active"
Another Example: Listview
<body>
<div data-role="page" id="main">
 <div data-role="header">
 <h1>My Header</h1>
 </div>
 <div data-role="content">
 <ul data-role="listview" data-inset="true" >
 <li><a href="#page2#">Page Two</a></li>
 <li><a href="newpage.html">New Page</a></li>
 </ul>
 </div>
 <div data-role="footer">
 <h4>My Footer</h4>
 </div>
</div>
<body>
Find out more on

 http://jquerymobile.com

  Application Gallery

http://www.jqmgallery.com

More Related Content

What's hot

Android ui layout
Android ui layoutAndroid ui layout
Android ui layout
Krazy Koder
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
Ganga Ram
 
Android animation
Android animationAndroid animation
Android animation
Krazy Koder
 

What's hot (20)

Js ppt
Js pptJs ppt
Js ppt
 
jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Android UI
Android UIAndroid UI
Android UI
 
Bootstrap 5 ppt
Bootstrap 5 pptBootstrap 5 ppt
Bootstrap 5 ppt
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)Introduction to Apache Cordova (Phonegap)
Introduction to Apache Cordova (Phonegap)
 
Node.js Event Emitter
Node.js Event EmitterNode.js Event Emitter
Node.js Event Emitter
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layout
 
Android styles and themes
Android styles and themesAndroid styles and themes
Android styles and themes
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
A Basic Django Introduction
A Basic Django IntroductionA Basic Django Introduction
A Basic Django Introduction
 
Introduction of Html/css/js
Introduction of Html/css/jsIntroduction of Html/css/js
Introduction of Html/css/js
 
Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
 
Android animation
Android animationAndroid animation
Android animation
 
Css animation
Css animationCss animation
Css animation
 
androidstudio.pptx
androidstudio.pptxandroidstudio.pptx
androidstudio.pptx
 
jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
 
Angular 8
Angular 8 Angular 8
Angular 8
 

Viewers also liked

Agile & SCRUM
Agile & SCRUMAgile & SCRUM
Agile & SCRUM
ejlp12
 
PMP Training - 12 project procurement management
PMP Training - 12 project procurement managementPMP Training - 12 project procurement management
PMP Training - 12 project procurement management
ejlp12
 
PMP Training - 08 project quality management
PMP Training - 08 project quality managementPMP Training - 08 project quality management
PMP Training - 08 project quality management
ejlp12
 
PMP Training - 04 project integration management
PMP Training - 04 project integration managementPMP Training - 04 project integration management
PMP Training - 04 project integration management
ejlp12
 
PMP Training - 06 project time management2
PMP Training - 06 project time management2PMP Training - 06 project time management2
PMP Training - 06 project time management2
ejlp12
 
PMP Training - 10 project communication management
PMP Training - 10 project communication managementPMP Training - 10 project communication management
PMP Training - 10 project communication management
ejlp12
 
PMP Training - 05 project scope management
PMP Training - 05 project scope managementPMP Training - 05 project scope management
PMP Training - 05 project scope management
ejlp12
 
PMP Training - 09 project human resource management
PMP Training - 09 project human resource managementPMP Training - 09 project human resource management
PMP Training - 09 project human resource management
ejlp12
 
PMP Training - 11 project risk management
PMP Training - 11 project risk managementPMP Training - 11 project risk management
PMP Training - 11 project risk management
ejlp12
 
PMP Training - 01 introduction to framework
PMP Training - 01 introduction to frameworkPMP Training - 01 introduction to framework
PMP Training - 01 introduction to framework
ejlp12
 
PMP Training - 07 project cost management
PMP Training - 07 project cost managementPMP Training - 07 project cost management
PMP Training - 07 project cost management
ejlp12
 

Viewers also liked (20)

Jquerymobile ppt
Jquerymobile pptJquerymobile ppt
Jquerymobile ppt
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile: Progressive Enhancement with HTML5jQuery Mobile: Progressive Enhancement with HTML5
jQuery Mobile: Progressive Enhancement with HTML5
 
jQuery Mobile with HTML5
jQuery Mobile with HTML5jQuery Mobile with HTML5
jQuery Mobile with HTML5
 
Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap
 
JBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment ArchitectureJBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
JBoss Data Virtualization (JDV) Sample Physical Deployment Architecture
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & docker
 
Agile & SCRUM
Agile & SCRUMAgile & SCRUM
Agile & SCRUM
 
IBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) ConceptIBM WebSphere Application Server (Clustering) Concept
IBM WebSphere Application Server (Clustering) Concept
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
PMP Training - 12 project procurement management
PMP Training - 12 project procurement managementPMP Training - 12 project procurement management
PMP Training - 12 project procurement management
 
PMP Training - 08 project quality management
PMP Training - 08 project quality managementPMP Training - 08 project quality management
PMP Training - 08 project quality management
 
PMP Training - 04 project integration management
PMP Training - 04 project integration managementPMP Training - 04 project integration management
PMP Training - 04 project integration management
 
PMP Training - 06 project time management2
PMP Training - 06 project time management2PMP Training - 06 project time management2
PMP Training - 06 project time management2
 
PMP Training - 10 project communication management
PMP Training - 10 project communication managementPMP Training - 10 project communication management
PMP Training - 10 project communication management
 
PMP Training - 05 project scope management
PMP Training - 05 project scope managementPMP Training - 05 project scope management
PMP Training - 05 project scope management
 
PMP Training - 09 project human resource management
PMP Training - 09 project human resource managementPMP Training - 09 project human resource management
PMP Training - 09 project human resource management
 
PMP Training - 11 project risk management
PMP Training - 11 project risk managementPMP Training - 11 project risk management
PMP Training - 11 project risk management
 
PMP Training - 01 introduction to framework
PMP Training - 01 introduction to frameworkPMP Training - 01 introduction to framework
PMP Training - 01 introduction to framework
 
PMP Training - 07 project cost management
PMP Training - 07 project cost managementPMP Training - 07 project cost management
PMP Training - 07 project cost management
 

Similar to Introduction to jQuery Mobile

HTML5 and Mobile
HTML5 and MobileHTML5 and Mobile
HTML5 and Mobile
doodoofish
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
James Pearce
 
HTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - AltranHTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - Altran
Robert Nyman
 

Similar to Introduction to jQuery Mobile (20)

jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
 
Jquery Cheatsheet
Jquery CheatsheetJquery Cheatsheet
Jquery Cheatsheet
 
HTML5 and Mobile
HTML5 and MobileHTML5 and Mobile
HTML5 and Mobile
 
Adobe & HTML5
Adobe & HTML5Adobe & HTML5
Adobe & HTML5
 
Challenges going mobile
Challenges going mobileChallenges going mobile
Challenges going mobile
 
JQuery Mobile UI
JQuery Mobile UIJQuery Mobile UI
JQuery Mobile UI
 
Once Source to Rule Them All
Once Source to Rule Them AllOnce Source to Rule Them All
Once Source to Rule Them All
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Desenvolvimento web com jQuery Mobile
Desenvolvimento web com jQuery MobileDesenvolvimento web com jQuery Mobile
Desenvolvimento web com jQuery Mobile
 
Overview on jQuery mobile
Overview on jQuery mobileOverview on jQuery mobile
Overview on jQuery mobile
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
HTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - AltranHTML5, The Open Web, and what it means for you - Altran
HTML5, The Open Web, and what it means for you - Altran
 
Taking your Web App for a walk
Taking your Web App for a walkTaking your Web App for a walk
Taking your Web App for a walk
 
Introduction to jQuery Mobile - Web Deliver for All
Introduction to jQuery Mobile - Web Deliver for AllIntroduction to jQuery Mobile - Web Deliver for All
Introduction to jQuery Mobile - Web Deliver for All
 
Cordova training : Day 5 - UI development using Framework7
Cordova training : Day 5 - UI development using Framework7Cordova training : Day 5 - UI development using Framework7
Cordova training : Day 5 - UI development using Framework7
 
Design Tips & Development with jQuery Mobile and PhoneGap
Design Tips & Development with jQuery Mobile and PhoneGapDesign Tips & Development with jQuery Mobile and PhoneGap
Design Tips & Development with jQuery Mobile and PhoneGap
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Choosing the Right Mobile Development Platform (Part 2)
Choosing the Right Mobile Development Platform (Part 2)Choosing the Right Mobile Development Platform (Part 2)
Choosing the Right Mobile Development Platform (Part 2)
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery Mobile
 

More from ejlp12

Arah pengembangan core network architecture (Indonesia)
Arah pengembangan core network architecture (Indonesia)Arah pengembangan core network architecture (Indonesia)
Arah pengembangan core network architecture (Indonesia)
ejlp12
 

More from ejlp12 (14)

Introduction to Docker storage, volume and image
Introduction to Docker storage, volume and imageIntroduction to Docker storage, volume and image
Introduction to Docker storage, volume and image
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
 
WebSphere Application Server Information Resources
WebSphere Application Server Information ResourcesWebSphere Application Server Information Resources
WebSphere Application Server Information Resources
 
WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)WebSphere Application Server Family (Editions Comparison)
WebSphere Application Server Family (Editions Comparison)
 
BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)BPEL, BPEL vs ESB (Integration)
BPEL, BPEL vs ESB (Integration)
 
BPMN Introduction
BPMN IntroductionBPMN Introduction
BPMN Introduction
 
WebSphere Application Server Topology Options
WebSphere Application Server Topology OptionsWebSphere Application Server Topology Options
WebSphere Application Server Topology Options
 
IBM WebSphere Application Server version to version comparison
IBM WebSphere Application Server version to version comparisonIBM WebSphere Application Server version to version comparison
IBM WebSphere Application Server version to version comparison
 
IBM WebSphere MQ Introduction
IBM WebSphere MQ Introduction IBM WebSphere MQ Introduction
IBM WebSphere MQ Introduction
 
Java EE Introduction
Java EE IntroductionJava EE Introduction
Java EE Introduction
 
Introduction to JPA (JPA version 2.0)
Introduction to JPA (JPA version 2.0)Introduction to JPA (JPA version 2.0)
Introduction to JPA (JPA version 2.0)
 
Introduction to JavaBeans Activation Framework v1.1
Introduction to JavaBeans Activation Framework v1.1Introduction to JavaBeans Activation Framework v1.1
Introduction to JavaBeans Activation Framework v1.1
 
Arah pengembangan core network architecture (Indonesia)
Arah pengembangan core network architecture (Indonesia)Arah pengembangan core network architecture (Indonesia)
Arah pengembangan core network architecture (Indonesia)
 
GSM/UMTS network architecture tutorial (Indonesia)
GSM/UMTS network architecture tutorial (Indonesia)GSM/UMTS network architecture tutorial (Indonesia)
GSM/UMTS network architecture tutorial (Indonesia)
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 

Introduction to jQuery Mobile

  • 1. Introduction to ejlp12@gmail.com - Dec2012
  • 2. 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. If you know basic HTML, you can start building mobile sites right away. By using hybrid mobile application tool such as Apache Cordova/Cordova then you can create native installable mobile application.
  • 3. jQuery Mobile features  Pages & Dialogs, Navigation system  Toolbars (Header & Footer bars)  Content formating (collapsible content blocks, columns layout)  Button’s (Including a set of stock icons)  Form Controls (Slider’s, Toggles, enhanced radio, checkbox, etc)  List View Control http://jquerymobile.com
  • 4. jQuery Mobile Demo http://jquerymobile.com/demos/1.2.0/
  • 5. Supported Devices Apple iOS Meego Windows Phone 7 Android Tizen Symbian Blackberry Samsung Bada Palm webOS http://jquerymobile.com/gbs/
  • 6. Customize Theme iOS Theme <link rel="stylesheet" href="css/themes/my-custom-theme.css" /> http://jquerymobile.com/themeroller/
  • 7. Customize Download  Download only the code that you’re using – Minimal file size – Function code that are not used is not included http://jquerymobile.com/download-builder/
  • 8. Getting started  Components – jQuery Core JS – jQuery Mobile JS – jQuery Mobile CSS HTML5 DOCTYPE <!DOCTYPE html> <html> Making widht fit to the screen <head> <title>Page Title</title> JQuery Mobile CSS & JS <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script> </head> <body> ... </body>
  • 9. data-role Attribute <body> <div data-role="page" id="main"> <div data-role="header"> <h1>My Header</h1> </div> <div data-role="content"> <p>Here is a <a href="#page2">link</a> to another page.</p> </div> <div data-role="footer"> <h4>My Footer</h4> </div> </div> </body> An element that represent a jQuery Mobile widget is using HTML attribute data-role Immediate children of a "page" are divs with data-roles of "header", "content", and "footer".
  • 10. Page navigation <body> <div data-role="page" id="foo"> <div data-role="header"> <h1>First</h1> </div> <div data-role="content"> <p>I'm first Page</p> <p><a href="#bar">Link to second page</a></p> </div> <div data-role="page" id=“bar"> <div data-role="header“ data-add-back-btn="true"> <h1>Second</h1></div> <div data-role="content"> <p>I'm second Page</p> <p><a href="#foo">Link to first page</a></p> </div> </body>  Page is basically a div identified by data-role="page" and id  Link to page is using element a (anchor) with id name of page div as a value of href attribute. Back button in the header can be automatically added by adding data-add-back-btn="true“  Another button in the header can be added using anchor tag inside header div e.g. <a href="index.html" data-icon="check">Save</a>
  • 11. Navigation bar: Navbar <div data-role="footer"> <div data-role="navbar" data-iconpos="top"> <ul> <li><a href="#" data-icon="home“ class="ui-btn-active">One</a></li> <li><a href="#" data-icon="gear">Two</a></li> <li><a href="#" data-icon="info">Three</a></li> </ul> </div> </div>  Navigation bar can be in header or footer  Use ul, li and a tag  Navigation item can be text only, icon only or both  Standard icon without adding icon/image file can be use or use additional image/icon file.  Default icon position is on top. Change the position of icon relative to the text using data- iconpos attribute e.g. data-iconpos="bottom"  To make a navigation item active use class="ui-btn-active"
  • 12. Another Example: Listview <body> <div data-role="page" id="main"> <div data-role="header"> <h1>My Header</h1> </div> <div data-role="content"> <ul data-role="listview" data-inset="true" > <li><a href="#page2#">Page Two</a></li> <li><a href="newpage.html">New Page</a></li> </ul> </div> <div data-role="footer"> <h4>My Footer</h4> </div> </div> <body>
  • 13. Find out more on http://jquerymobile.com Application Gallery http://www.jqmgallery.com