SlideShare una empresa de Scribd logo
1 de 24
Mobile Web Framework
3.1 Install the WebApps tools
• Our HTML5 document need to include:
• The jQuery core JavaScript file
• The jQuery Mobile core JavaScript file
• The jQuery Mobile core CSS file
• The jQuery Mobile theme CSS file (optional)
Host all the files within your project
• download the latest ZIP package from
http://jquerymobile.com/download
• add the following files to your project’s root folder:
jquery-XX.js (from the jQuery core)images folder
jquery.mobile-XX_min.js
jquery.mobile-XX_min.css
• If you are creating a webapp using PhoneGap or
another offline/hybrid mechanism, it’s better to embed
the files inside your package so the webapp can work
offline.
Using a CDN
• Stands for Content Delivery Networks
• A jQuery CDN is just a public server on the
Web hosting the files for us
• The main disadvantage is that our webapp will
work only if the public CDN is online
Use the mobile WebApps architecture
WebApps Architecture
• The main unit of the framework is the page
• A page is just a div element with a specific role
• One HTML document can host one page or
many pages inside the same file
Roles
• jQuery Mobile uses standard HTML markup,
such as the div tag
• To define what the framework should do with
that div, we define a role.
• A role in the framework is defined using the
attribute data-role. For example,
• <div data-role="page">
Theming
• jQuery Mobile uses a powerful theming mechanism to
define visual appearance of the user interface
• A theme is a group of definitions for layout, styles, and
colors.
• Every theme includes a set of color swatches that we
can change anywhere in our webapp.
• Color swatches are created to have different options to
show elements.
• A color swatch is defined by a letter, from a to z. The
default theme includes swatches from a to e with the
ability to add more letters of our own.
The Page
• A typical page will be divided in three parts:
header, content, and footer.
• The only mandatory section is the content
Nagivation
• For navigation between pages, we will use
standard a (anchor) elements.
• jQuery Mobile will take them and do the magic
for us.
• different types of hyperlinks that we can make:
– Internal links to another page in the same document
(known as a multipage document)
– External links to a page in other jQuery Mobile
documents
– Absolute links to non-jQuery Mobile documents
– Mobile special links
Back Button
• If we want to add a visual “back” button at the
left of the header, we can use the
data-add- back-btn="true" attribute
on our page.
Internal Page Links
• We have already mentioned that a jQuery Mobile
document can nest multiple pages inside.
• To do that, we add multiple pages as body’s children.
We need to define a id (identification name) using
standard HTML for every page, so we can then access
them.
• To create a link to another page inside the same
document, we just need to use #<id>
• in the href attribute, where <id> is the identification
name of the target page. For example:
<a href="#next">
External Page Links
• If we don’t want to include a page inside the
same document as the first one, or if we need
to dynamically create the content.example,
using PHP or any other serverside code), we
can link to another jQuery Mobile HTML
document using standard a tags:
Absolute External Links
• Sometimes we want to link to another site or
document that does not belong to jQuery
Mobile content.
• For that purpose, we need to explicitly define
an absolute external link. We can accomplish
this by adding data-rel="external" to the a tag:
Mobile Special Links
• Remember we are creating mobile web
experiences.
• We should enhance the user’s experience by
integrating our app with the device whenever
we can.
• We can include call or send SMS actions using
URI schemes
The available transitions are:
• slide
• The default right-to-left animation.
• slideup
• Bottom-to-top animation, mostly used for modal pages.
• slidedown
• Top-to-bottom animation.
• pop
• The new page will grow from a small point in the middle to a full-screen page.
• fade
• A cross-fade animation between old and new pages.
• flip
• A 2D or 3D rotation animation. 3D is available only on some devices, such as iOS
devices.
• On other devices, such as those that are Android-based, this transition renders a
2D rotation that may not be the effect you really want.
Dialogues
• A dialog is just another way to show a page in
our webapp.
• Therefore, a dialog is not a new thing. It is just
a page with a different semantic.
• A dialog page is intended for modal messages,
lists, or information that does not have any
hierarchal relation with the page that links to
it.
To open a dialog page, we need to
use data-rel="dialog" inside the a
tag where the link goes.
Opening Pages from Dialogs
• Dialogs can have normal links to other pages
(or absolute external links).
• When the user selects a link that points to a
different page than the opener (as we saw in
the last section), jQuery Mobile will close the
dialog, go back to the opener page, and then
open the new page as if it were hosted in the
opener.
Integrate the WebApps with the phone
Making a Call
• The preferred method is to use the tel:<phone
number> scheme (using URI scheme).
• If the user activates a call link, she will receive
a confirmation alert asking whether to place
the call, showing the full number so she can
decide.
Video and VoIP Calls
• iOS-based devices with cameras, such as
iPhone 4 and iPod Touch 4G, include a
videochat application called FaceTime.
• If you are targeting these devices, you can
create a videocall link using
facetime://<user-name-or-
number>. These links will lead to an error in
other devices:
Sending Email
• Some modern devices with browsers also have
mail applications that can react to the classic web
mailto: protocol.
• The syntax is ?parameters. The detected
parameters can change from device to device but
generally include cc, bcc, subject, and body.
• The parameters are defined in a URL format
(key=value&key=value), and the values must be
URI-encoded.
Example
Sending SMS
• we have two possible URI schemes, sms://
and smsto://
• Unfortunately, there is no standard way to
know for sure which one is compatible with a
user’s browser.
• However, for jQuery Mobile only
smartphones, we can safely use sms://

Más contenido relacionado

La actualidad más candente

Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
Rich Bradshaw
 
SharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & AccessibilitySharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & Accessibility
Mavention
 
jQuery Mobile Hour 4
jQuery Mobile Hour 4jQuery Mobile Hour 4
jQuery Mobile Hour 4
Gene Babon
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
Ron Reiter
 

La actualidad más candente (20)

Html 5 tutorial - By Bally Chohan
Html 5 tutorial - By Bally ChohanHtml 5 tutorial - By Bally Chohan
Html 5 tutorial - By Bally Chohan
 
Introduction to Web Components
Introduction to Web ComponentsIntroduction to Web Components
Introduction to Web Components
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
Busy Architects Guide to Modern Web Architecture in 2014
Busy Architects Guide to  Modern Web Architecture in 2014Busy Architects Guide to  Modern Web Architecture in 2014
Busy Architects Guide to Modern Web Architecture in 2014
 
EchoSign E-Signature Winter '11 Release and New Features
EchoSign E-Signature Winter '11 Release and New FeaturesEchoSign E-Signature Winter '11 Release and New Features
EchoSign E-Signature Winter '11 Release and New Features
 
A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3A practical guide to building websites with HTML5 & CSS3
A practical guide to building websites with HTML5 & CSS3
 
SharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & AccessibilitySharePoint 2010 Web Standards & Accessibility
SharePoint 2010 Web Standards & Accessibility
 
Developing Custom Applications with Joomla! and Fabrik
Developing Custom Applications with Joomla! and FabrikDeveloping Custom Applications with Joomla! and Fabrik
Developing Custom Applications with Joomla! and Fabrik
 
What is jQuery?
What is jQuery?What is jQuery?
What is jQuery?
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
 
Html5 semantics
Html5 semanticsHtml5 semantics
Html5 semantics
 
jQuery Mobile Hour 4
jQuery Mobile Hour 4jQuery Mobile Hour 4
jQuery Mobile Hour 4
 
The Future of the Web: HTML5
The Future of the Web: HTML5The Future of the Web: HTML5
The Future of the Web: HTML5
 
Websites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly WebsitesWebsites Unlimited - Pay Monthly Websites
Websites Unlimited - Pay Monthly Websites
 
Html5 basics
Html5 basicsHtml5 basics
Html5 basics
 
IBM Domino Mobile Apps - ENG
IBM Domino Mobile Apps - ENGIBM Domino Mobile Apps - ENG
IBM Domino Mobile Apps - ENG
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Industrial training report
Industrial training report Industrial training report
Industrial training report
 
HTML5 New Features and Resources
HTML5 New Features and ResourcesHTML5 New Features and Resources
HTML5 New Features and Resources
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 

Destacado

Abo el fetouh presidential campaign
Abo el fetouh presidential campaignAbo el fetouh presidential campaign
Abo el fetouh presidential campaign
Amr Ashour
 
Distracter Factor
Distracter FactorDistracter Factor
Distracter Factor
bmarfin
 
Doa asmaul husna ok bgt
Doa asmaul husna ok bgtDoa asmaul husna ok bgt
Doa asmaul husna ok bgt
tugaspai
 

Destacado (20)

The farewell advice
The farewell adviceThe farewell advice
The farewell advice
 
PC LMR 2011
PC LMR 2011PC LMR 2011
PC LMR 2011
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 
Bb canvas convergence
Bb canvas convergenceBb canvas convergence
Bb canvas convergence
 
Talora
TaloraTalora
Talora
 
Tools for Effective Contact Management
Tools for Effective Contact ManagementTools for Effective Contact Management
Tools for Effective Contact Management
 
Subaru 2
Subaru 2Subaru 2
Subaru 2
 
asdasdasd
asdasdasdasdasdasd
asdasdasd
 
Kashmir
Kashmir Kashmir
Kashmir
 
Informe girasbotánicas
Informe girasbotánicasInforme girasbotánicas
Informe girasbotánicas
 
Abo el fetouh presidential campaign
Abo el fetouh presidential campaignAbo el fetouh presidential campaign
Abo el fetouh presidential campaign
 
Les origines de la bible
Les origines de la bibleLes origines de la bible
Les origines de la bible
 
Distracter Factor
Distracter FactorDistracter Factor
Distracter Factor
 
Kitab ut tawheed
Kitab ut tawheedKitab ut tawheed
Kitab ut tawheed
 
Valentine2009
Valentine2009Valentine2009
Valentine2009
 
Doa asmaul husna ok bgt
Doa asmaul husna ok bgtDoa asmaul husna ok bgt
Doa asmaul husna ok bgt
 
14drugpr
14drugpr14drugpr
14drugpr
 
Media studies @salman#1
Media studies @salman#1Media studies @salman#1
Media studies @salman#1
 
Brand management1
Brand management1Brand management1
Brand management1
 
100 Yrs Accident Investigation
100 Yrs Accident Investigation100 Yrs Accident Investigation
100 Yrs Accident Investigation
 

Similar a Chapter3 mo

GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPress
GGDBologna
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
Gil Irizarry
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
Nuxeo
 
jQuery Mobile Hour 4
jQuery Mobile Hour 4jQuery Mobile Hour 4
jQuery Mobile Hour 4
Gene Babon
 
Webdesigningandpublishingcomputerstudiestheorylesson 101212054612-phpapp02
Webdesigningandpublishingcomputerstudiestheorylesson 101212054612-phpapp02Webdesigningandpublishingcomputerstudiestheorylesson 101212054612-phpapp02
Webdesigningandpublishingcomputerstudiestheorylesson 101212054612-phpapp02
Harshith Rockx
 

Similar a Chapter3 mo (20)

Mobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPressMobile Hybrid Development with WordPress
Mobile Hybrid Development with WordPress
 
GeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPressGeneralMobile Hybrid Development with WordPress
GeneralMobile Hybrid Development with WordPress
 
JQuery mobile
JQuery mobileJQuery mobile
JQuery mobile
 
Jquery Mobile
Jquery MobileJquery Mobile
Jquery Mobile
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
1_Intro_toHTML.ppt
1_Intro_toHTML.ppt1_Intro_toHTML.ppt
1_Intro_toHTML.ppt
 
Jquery mobile
Jquery mobileJquery mobile
Jquery mobile
 
The Mobile Development Landscape
The Mobile Development LandscapeThe Mobile Development Landscape
The Mobile Development Landscape
 
Make Mobile Apps Quickly
Make Mobile Apps QuicklyMake Mobile Apps Quickly
Make Mobile Apps Quickly
 
Beautiful UI in react native By - nativebase.io
Beautiful UI in react native By - nativebase.ioBeautiful UI in react native By - nativebase.io
Beautiful UI in react native By - nativebase.io
 
Global Website System Introduction
Global Website System IntroductionGlobal Website System Introduction
Global Website System Introduction
 
Static dynamic and active web pages
Static dynamic and active web pagesStatic dynamic and active web pages
Static dynamic and active web pages
 
Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011Mobile ECM with JavaScript - JSE 2011
Mobile ECM with JavaScript - JSE 2011
 
Introduction to hybrid application development
Introduction to hybrid application developmentIntroduction to hybrid application development
Introduction to hybrid application development
 
jQuery Mobile Hour 4
jQuery Mobile Hour 4jQuery Mobile Hour 4
jQuery Mobile Hour 4
 
Digital Literacy - Web vs Mobile Apps, File Transfers (Session 2)
Digital Literacy - Web vs Mobile Apps, File Transfers (Session 2)Digital Literacy - Web vs Mobile Apps, File Transfers (Session 2)
Digital Literacy - Web vs Mobile Apps, File Transfers (Session 2)
 
Chapter 2 introduction to html5
Chapter 2 introduction to html5Chapter 2 introduction to html5
Chapter 2 introduction to html5
 
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite
Couchbase Mobile Ideathon in Tokyo 2014.08.29: Developing with couchbase lite
 
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
Make Cross-platform Mobile Apps Quickly - SIGGRAPH 2014
 
Webdesigningandpublishingcomputerstudiestheorylesson 101212054612-phpapp02
Webdesigningandpublishingcomputerstudiestheorylesson 101212054612-phpapp02Webdesigningandpublishingcomputerstudiestheorylesson 101212054612-phpapp02
Webdesigningandpublishingcomputerstudiestheorylesson 101212054612-phpapp02
 

Último

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Último (20)

HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Chapter3 mo

  • 2. 3.1 Install the WebApps tools • Our HTML5 document need to include: • The jQuery core JavaScript file • The jQuery Mobile core JavaScript file • The jQuery Mobile core CSS file • The jQuery Mobile theme CSS file (optional)
  • 3. Host all the files within your project • download the latest ZIP package from http://jquerymobile.com/download • add the following files to your project’s root folder: jquery-XX.js (from the jQuery core)images folder jquery.mobile-XX_min.js jquery.mobile-XX_min.css • If you are creating a webapp using PhoneGap or another offline/hybrid mechanism, it’s better to embed the files inside your package so the webapp can work offline.
  • 4. Using a CDN • Stands for Content Delivery Networks • A jQuery CDN is just a public server on the Web hosting the files for us • The main disadvantage is that our webapp will work only if the public CDN is online
  • 5. Use the mobile WebApps architecture
  • 6. WebApps Architecture • The main unit of the framework is the page • A page is just a div element with a specific role • One HTML document can host one page or many pages inside the same file
  • 7. Roles • jQuery Mobile uses standard HTML markup, such as the div tag • To define what the framework should do with that div, we define a role. • A role in the framework is defined using the attribute data-role. For example, • <div data-role="page">
  • 8. Theming • jQuery Mobile uses a powerful theming mechanism to define visual appearance of the user interface • A theme is a group of definitions for layout, styles, and colors. • Every theme includes a set of color swatches that we can change anywhere in our webapp. • Color swatches are created to have different options to show elements. • A color swatch is defined by a letter, from a to z. The default theme includes swatches from a to e with the ability to add more letters of our own.
  • 9. The Page • A typical page will be divided in three parts: header, content, and footer. • The only mandatory section is the content
  • 10. Nagivation • For navigation between pages, we will use standard a (anchor) elements. • jQuery Mobile will take them and do the magic for us. • different types of hyperlinks that we can make: – Internal links to another page in the same document (known as a multipage document) – External links to a page in other jQuery Mobile documents – Absolute links to non-jQuery Mobile documents – Mobile special links
  • 11. Back Button • If we want to add a visual “back” button at the left of the header, we can use the data-add- back-btn="true" attribute on our page.
  • 12. Internal Page Links • We have already mentioned that a jQuery Mobile document can nest multiple pages inside. • To do that, we add multiple pages as body’s children. We need to define a id (identification name) using standard HTML for every page, so we can then access them. • To create a link to another page inside the same document, we just need to use #<id> • in the href attribute, where <id> is the identification name of the target page. For example: <a href="#next">
  • 13. External Page Links • If we don’t want to include a page inside the same document as the first one, or if we need to dynamically create the content.example, using PHP or any other serverside code), we can link to another jQuery Mobile HTML document using standard a tags:
  • 14. Absolute External Links • Sometimes we want to link to another site or document that does not belong to jQuery Mobile content. • For that purpose, we need to explicitly define an absolute external link. We can accomplish this by adding data-rel="external" to the a tag:
  • 15. Mobile Special Links • Remember we are creating mobile web experiences. • We should enhance the user’s experience by integrating our app with the device whenever we can. • We can include call or send SMS actions using URI schemes
  • 16. The available transitions are: • slide • The default right-to-left animation. • slideup • Bottom-to-top animation, mostly used for modal pages. • slidedown • Top-to-bottom animation. • pop • The new page will grow from a small point in the middle to a full-screen page. • fade • A cross-fade animation between old and new pages. • flip • A 2D or 3D rotation animation. 3D is available only on some devices, such as iOS devices. • On other devices, such as those that are Android-based, this transition renders a 2D rotation that may not be the effect you really want.
  • 17. Dialogues • A dialog is just another way to show a page in our webapp. • Therefore, a dialog is not a new thing. It is just a page with a different semantic. • A dialog page is intended for modal messages, lists, or information that does not have any hierarchal relation with the page that links to it.
  • 18. To open a dialog page, we need to use data-rel="dialog" inside the a tag where the link goes.
  • 19. Opening Pages from Dialogs • Dialogs can have normal links to other pages (or absolute external links). • When the user selects a link that points to a different page than the opener (as we saw in the last section), jQuery Mobile will close the dialog, go back to the opener page, and then open the new page as if it were hosted in the opener.
  • 20. Integrate the WebApps with the phone Making a Call • The preferred method is to use the tel:<phone number> scheme (using URI scheme). • If the user activates a call link, she will receive a confirmation alert asking whether to place the call, showing the full number so she can decide.
  • 21. Video and VoIP Calls • iOS-based devices with cameras, such as iPhone 4 and iPod Touch 4G, include a videochat application called FaceTime. • If you are targeting these devices, you can create a videocall link using facetime://<user-name-or- number>. These links will lead to an error in other devices:
  • 22. Sending Email • Some modern devices with browsers also have mail applications that can react to the classic web mailto: protocol. • The syntax is ?parameters. The detected parameters can change from device to device but generally include cc, bcc, subject, and body. • The parameters are defined in a URL format (key=value&key=value), and the values must be URI-encoded.
  • 24. Sending SMS • we have two possible URI schemes, sms:// and smsto:// • Unfortunately, there is no standard way to know for sure which one is compatible with a user’s browser. • However, for jQuery Mobile only smartphones, we can safely use sms://