SlideShare a Scribd company logo
1 of 12
Download to read offline
jQuery Mobile
                Hour 4
Intro to the jQuery Mobile Framework



                           about.me/babon
What You'll Learn in Hour 4
+ What files make up the jQuery Mobile
framework
+ How jQuery Mobile works with data attributes
+ How to use jQuery Mobile to create a simple
page
+ How to use the mobile initiation event



                                about.me/babon
Adding jQuery Mobile to Your Site
These files make up the complete jQuery
Mobile framework:

● jQuery library JavaScript file
● jQuery Mobile library JavaScript file
● jQuery Mobile CSS stylesheet




                                  about.me/babon
Adding jQuery Mobile to Your Site
Go to jQuery.com to find these files.

Explore jQueryMobile.com:
● Docs
● Download
● Platforms
● Themes
● Resources
● Forum
● Blog                            about.me/babon
Adding jQuery Mobile to Your Site
Basic page layout:

Example: basic_layout.html

content="width=device-width, initial-scale=1"

● when page is viewed it should not be
  zoomed in or zoomed out

                                  about.me/babon
Using Data Roles
Data attributes are part of the HTML5
specification.

jQuery Mobile uses these data attributes to
create data roles for data storage.

To create a data attribute you must start the
attribute with "data-" followed by lowercase
letters. Examples: data-phone, data-userid
                                 about.me/babon
Creating a Simple Page
Example #1: expanded_layout.html

data-role="page"

● allows jQuery Mobile to treat this div as a
  single page
● allow you to have a multipage site contained
  in one HTML file

                                about.me/babon
Creating a Simple Page
Example #1: expanded_layout.html

data-role="header" and data-role="content"

data-role="button"

● allows jQuery Mobile to transform a standard
  link into a fully styled button

                                about.me/babon
Creating a Simple Page
Example #2: button_click.html

data-rel="dialog"

● allows jQuery Mobile to display a linked
  element as a dialog instead of a standard
  page


                                about.me/babon
Creating a Simple Page
Example #2: button_click.html

data-theme="d"

● allows jQuery Mobile to style the dialog
  window a little differently than the current
  color scheme
● currently five themes: a, b, c, d, e

                                   about.me/babon
Creating a Simple Page
Example #2: button_click.html

data-rel="back"

● allows jQuery Mobile to enable the back
  button
● NOTE: href="#"


                                about.me/babon
Understanding the Mobile Initiation
Event
To be discussed at a later time.




                                   about.me/babon

More Related Content

What's hot

Creating better behat features
Creating better behat featuresCreating better behat features
Creating better behat featuresrobincawser
 
Theming websites effortlessly with Deliverance (CMSExpo 2010)
Theming websites effortlessly with Deliverance (CMSExpo 2010)Theming websites effortlessly with Deliverance (CMSExpo 2010)
Theming websites effortlessly with Deliverance (CMSExpo 2010)Jazkarta, Inc.
 
Beginning jQuery Mobile
Beginning jQuery MobileBeginning jQuery Mobile
Beginning jQuery MobileTroy Miles
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web componentsJarrod Overson
 
JQuery mobile
JQuery mobileJQuery mobile
JQuery mobileGary Yeh
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryJames Johnson
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can buildMonika Piotrowicz
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkBorisMoore
 
Online Resources for Teachers and Students
Online Resources for Teachers and StudentsOnline Resources for Teachers and Students
Online Resources for Teachers and StudentsJeff Wheeler
 
jQuery Conference Toronto
jQuery Conference TorontojQuery Conference Toronto
jQuery Conference Torontodmethvin
 
Scaling Drupal @ iMoney - DrupalCamp Singapore 2014
Scaling Drupal @ iMoney - DrupalCamp Singapore 2014Scaling Drupal @ iMoney - DrupalCamp Singapore 2014
Scaling Drupal @ iMoney - DrupalCamp Singapore 2014imoneytech
 

What's hot (11)

Creating better behat features
Creating better behat featuresCreating better behat features
Creating better behat features
 
Theming websites effortlessly with Deliverance (CMSExpo 2010)
Theming websites effortlessly with Deliverance (CMSExpo 2010)Theming websites effortlessly with Deliverance (CMSExpo 2010)
Theming websites effortlessly with Deliverance (CMSExpo 2010)
 
Beginning jQuery Mobile
Beginning jQuery MobileBeginning jQuery Mobile
Beginning jQuery Mobile
 
Real World Web components
Real World Web componentsReal World Web components
Real World Web components
 
JQuery mobile
JQuery mobileJQuery mobile
JQuery mobile
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Accessibility - A feature you can build
Accessibility - A feature you can buildAccessibility - A feature you can build
Accessibility - A feature you can build
 
Harness jQuery Templates and Data Link
Harness jQuery Templates and Data LinkHarness jQuery Templates and Data Link
Harness jQuery Templates and Data Link
 
Online Resources for Teachers and Students
Online Resources for Teachers and StudentsOnline Resources for Teachers and Students
Online Resources for Teachers and Students
 
jQuery Conference Toronto
jQuery Conference TorontojQuery Conference Toronto
jQuery Conference Toronto
 
Scaling Drupal @ iMoney - DrupalCamp Singapore 2014
Scaling Drupal @ iMoney - DrupalCamp Singapore 2014Scaling Drupal @ iMoney - DrupalCamp Singapore 2014
Scaling Drupal @ iMoney - DrupalCamp Singapore 2014
 

Similar to jQuery Mobile Hour 4

Building jQuery Mobile Web Apps
Building jQuery Mobile Web AppsBuilding jQuery Mobile Web Apps
Building jQuery Mobile Web AppsOperation Mobile
 
Building a Mobile Drupal Site
Building a Mobile Drupal SiteBuilding a Mobile Drupal Site
Building a Mobile Drupal SiteMark Jarrell
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery MobileDavid Hudson
 
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...Cristian Rodríguez Enríquez
 
Unlearning and Relearning jQuery - Client-side Performance Optimization
Unlearning and Relearning jQuery - Client-side Performance OptimizationUnlearning and Relearning jQuery - Client-side Performance Optimization
Unlearning and Relearning jQuery - Client-side Performance OptimizationJon Dean
 
Bloggin' Along: Bargains for Businesses
Bloggin' Along: Bargains for BusinessesBloggin' Along: Bargains for Businesses
Bloggin' Along: Bargains for BusinessesBetzi Paz
 
Introduction to the jQuery mobile framework
Introduction to the jQuery mobile frameworkIntroduction to the jQuery mobile framework
Introduction to the jQuery mobile frameworkRishabh Rao
 
TOC Workshop 2013
TOC Workshop 2013TOC Workshop 2013
TOC Workshop 2013Haig Armen
 
Going Mobile
Going MobileGoing Mobile
Going MobileStephen G
 
Think like a developer debugging seo - be wizard 2013 rimini
Think like a developer  debugging seo - be wizard 2013 riminiThink like a developer  debugging seo - be wizard 2013 rimini
Think like a developer debugging seo - be wizard 2013 riminiDavid Sottimano
 
a-blog cms 勉強会 NAGOYA 20110718
a-blog cms 勉強会 NAGOYA 20110718a-blog cms 勉強会 NAGOYA 20110718
a-blog cms 勉強会 NAGOYA 20110718Ayumu Sato
 
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 AllMarc Grabanski
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5Ron Reiter
 
Building WebApp with HTML5
Building WebApp with HTML5Building WebApp with HTML5
Building WebApp with HTML5Tien Tran Le Duy
 

Similar to jQuery Mobile Hour 4 (20)

Building jQuery Mobile Web Apps
Building jQuery Mobile Web AppsBuilding jQuery Mobile Web Apps
Building jQuery Mobile Web Apps
 
Chapter3 mo
Chapter3 moChapter3 mo
Chapter3 mo
 
Building a Mobile Drupal Site
Building a Mobile Drupal SiteBuilding a Mobile Drupal Site
Building a Mobile Drupal Site
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery Mobile
 
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
02 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
 
Unlearning and Relearning jQuery - Client-side Performance Optimization
Unlearning and Relearning jQuery - Client-side Performance OptimizationUnlearning and Relearning jQuery - Client-side Performance Optimization
Unlearning and Relearning jQuery - Client-side Performance Optimization
 
Bloggin' Along: Bargains for Businesses
Bloggin' Along: Bargains for BusinessesBloggin' Along: Bargains for Businesses
Bloggin' Along: Bargains for Businesses
 
Introduction to the jQuery mobile framework
Introduction to the jQuery mobile frameworkIntroduction to the jQuery mobile framework
Introduction to the jQuery mobile framework
 
TOC Workshop 2013
TOC Workshop 2013TOC Workshop 2013
TOC Workshop 2013
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Going Mobile
Going MobileGoing Mobile
Going Mobile
 
Think like a developer debugging seo - be wizard 2013 rimini
Think like a developer  debugging seo - be wizard 2013 riminiThink like a developer  debugging seo - be wizard 2013 rimini
Think like a developer debugging seo - be wizard 2013 rimini
 
a-blog cms 勉強会 NAGOYA 20110718
a-blog cms 勉強会 NAGOYA 20110718a-blog cms 勉強会 NAGOYA 20110718
a-blog cms 勉強会 NAGOYA 20110718
 
Swf search final
Swf search finalSwf search final
Swf search final
 
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
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Jquery Mobile
Jquery MobileJquery Mobile
Jquery Mobile
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Jquery mobile
Jquery mobileJquery mobile
Jquery mobile
 
Building WebApp with HTML5
Building WebApp with HTML5Building WebApp with HTML5
Building WebApp with HTML5
 

More from Gene Babon

Job Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling AlleysJob Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling AlleysGene Babon
 
Tech Over Fifty Launch Meeting
Tech Over Fifty Launch MeetingTech Over Fifty Launch Meeting
Tech Over Fifty Launch MeetingGene Babon
 
Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018Gene Babon
 
Become a Front End Web Developer
Become a Front End Web DeveloperBecome a Front End Web Developer
Become a Front End Web DeveloperGene Babon
 
Navigating a Career in Web Technology
Navigating a Career in Web TechnologyNavigating a Career in Web Technology
Navigating a Career in Web TechnologyGene Babon
 
Getting Things Done
Getting Things DoneGetting Things Done
Getting Things DoneGene Babon
 

More from Gene Babon (20)

Job Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling AlleysJob Search | Tropical Depressions | Bowling Alleys
Job Search | Tropical Depressions | Bowling Alleys
 
Tech Over Fifty Launch Meeting
Tech Over Fifty Launch MeetingTech Over Fifty Launch Meeting
Tech Over Fifty Launch Meeting
 
Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018Anatomy Virtual Self Study Group NEPHP 2018
Anatomy Virtual Self Study Group NEPHP 2018
 
Become a Front End Web Developer
Become a Front End Web DeveloperBecome a Front End Web Developer
Become a Front End Web Developer
 
Navigating a Career in Web Technology
Navigating a Career in Web TechnologyNavigating a Career in Web Technology
Navigating a Career in Web Technology
 
Info Session
Info SessionInfo Session
Info Session
 
Info session
Info sessionInfo session
Info session
 
Getting Things Done
Getting Things DoneGetting Things Done
Getting Things Done
 
Lesson 17
Lesson 17Lesson 17
Lesson 17
 
Lesson 18
Lesson 18Lesson 18
Lesson 18
 
Lesson 17
Lesson 17Lesson 17
Lesson 17
 
Lesson 16
Lesson 16Lesson 16
Lesson 16
 
Lesson 15
Lesson 15Lesson 15
Lesson 15
 
Lesson 11
Lesson 11Lesson 11
Lesson 11
 
Lesson 10
Lesson 10Lesson 10
Lesson 10
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
Lesson 05
Lesson 05Lesson 05
Lesson 05
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Lesson 01
Lesson 01Lesson 01
Lesson 01
 

jQuery Mobile Hour 4

  • 1. jQuery Mobile Hour 4 Intro to the jQuery Mobile Framework about.me/babon
  • 2. What You'll Learn in Hour 4 + What files make up the jQuery Mobile framework + How jQuery Mobile works with data attributes + How to use jQuery Mobile to create a simple page + How to use the mobile initiation event about.me/babon
  • 3. Adding jQuery Mobile to Your Site These files make up the complete jQuery Mobile framework: ● jQuery library JavaScript file ● jQuery Mobile library JavaScript file ● jQuery Mobile CSS stylesheet about.me/babon
  • 4. Adding jQuery Mobile to Your Site Go to jQuery.com to find these files. Explore jQueryMobile.com: ● Docs ● Download ● Platforms ● Themes ● Resources ● Forum ● Blog about.me/babon
  • 5. Adding jQuery Mobile to Your Site Basic page layout: Example: basic_layout.html content="width=device-width, initial-scale=1" ● when page is viewed it should not be zoomed in or zoomed out about.me/babon
  • 6. Using Data Roles Data attributes are part of the HTML5 specification. jQuery Mobile uses these data attributes to create data roles for data storage. To create a data attribute you must start the attribute with "data-" followed by lowercase letters. Examples: data-phone, data-userid about.me/babon
  • 7. Creating a Simple Page Example #1: expanded_layout.html data-role="page" ● allows jQuery Mobile to treat this div as a single page ● allow you to have a multipage site contained in one HTML file about.me/babon
  • 8. Creating a Simple Page Example #1: expanded_layout.html data-role="header" and data-role="content" data-role="button" ● allows jQuery Mobile to transform a standard link into a fully styled button about.me/babon
  • 9. Creating a Simple Page Example #2: button_click.html data-rel="dialog" ● allows jQuery Mobile to display a linked element as a dialog instead of a standard page about.me/babon
  • 10. Creating a Simple Page Example #2: button_click.html data-theme="d" ● allows jQuery Mobile to style the dialog window a little differently than the current color scheme ● currently five themes: a, b, c, d, e about.me/babon
  • 11. Creating a Simple Page Example #2: button_click.html data-rel="back" ● allows jQuery Mobile to enable the back button ● NOTE: href="#" about.me/babon
  • 12. Understanding the Mobile Initiation Event To be discussed at a later time. about.me/babon