SlideShare a Scribd company logo
Multimedia

jQuery Mobile

            Erik Duval
   Dept. Computerwetenschappen
http://www.cs.kuleuven.ac.be/~erikd/
http://www.slideshare.net/erik.duval




2
wat denken jullie?



        3
built on jQuery & jQuery UI




           4
built on jQuery & jQuery UI




           4
http://jquerymobile.com/demos/1.0rc1/
                  5
optimized for touch




         6
mobile events

• tap
• taphold          • orientationchange
• swipe            • scrollstart
• swipeleft        • scrollstop
• swiperight
               7
progressive enhancement
• ‘graceful degradation’
• A-grade – Full enhanced experience with Ajax-
  based animated page transitions.
• B-grade – Enhanced experience except without
  Ajax navigation features.
• C-grade – Basic, non-enhanced HTML experience
  that is still functional
• Not Officially Supported – May work, but haven’t
  been thoroughly tested or debugged
                             8
9
<!DOCTYPE html>
<html>
  <head>
  <title>jQuery Mobile: Pages within Pages</title>
  <link rel="stylesheet" href="http://code.jquery.com/
mobile/1.0a1/jquery.mobile-1.0a1.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-1.0a1.min.js"></script>
</head>
                           10
<div data-role="page">
    <div data-role="header">
         <h1>Page Title</h1>
</div>
    <div data-role="content">
         <p>Page content goes here.</p>
</div>
    <div data-role="footer">
         <h4>Page Footer</h4>
    </div>
</div>




                                11
<body>
<div data-role="page" id="home">
  <div data-role="header"><h1>Home</h1></div>
  <div data-role="content"><a href="#about">...</a></div>
</div>
<div data-role="page" id="about"> 
  <div data-role="header"><h1>About This App</h1></div>
  <div data-role="content">...! <a href="#home">Go</a></div>
</div>
</body>
                              12
• “auto-ajax” to pre-fetch content pages
• does not include GPS, canvas, local storage, ...



                       13
transition effects
• slide
• slideup
• slidedown
• pop
• fade
• flip
              14
http://jquery.com/
jQuery


• find something in HTML
• do something to it


                  16
$(“#content”) get element with id content
$(“li:first”) get first list item
$(“tr:odd”) get odd numbered table rows
$(“a[target=_blank]”) get all links who’s target is “_blank”
$(“form[id^=step]”) get all forms who’s id starts with “step”

Chaining
$(“#myId, .myClass, table”)
$(“div”).addClass(“redbox”).fadeOut();
$(...).html(function(i){return “<p>hello “ + i + “</p>”;});

                               17
methods

•   Moving Elements: append(), appendTo(), before(), after(),
•   Attributes: css(), attr(), html(), val(), addClass()
•   Events: bind(), trigger(), unbind(), live(), click()
•   Effects: show(), fadeOut(), toggle(), animate()
•   Traversing: find(), is(), prevAll(), next(), hasClass()
•   Ajax: get(), getJSON(), post(), ajax(), load()


                                 18
resources & thx

•   http://jquerymobile.com/

•   http://www.jqmgallery.com/

•   http://www.elated.com/articles/jquery-mobile-what-can-it-do-for-you/

•   http://miamicoder.com/2011/creating-a-website-using-jquery-mobile-part1/

•   http://docs.jquery.com/Tutorials

•   http://www.slideshare.net/1Marc/jquery-essentials




                                               19
Over to ... you!
Start from
http://miamicoder.com/2011/creating-a-website-using-
jquery-mobile-part1/
or
http://www.elated.com/articles/jquery-mobile-what-can-
it-do-for-you/


                         20
Questions?
http://erikduval.wordpress.com/
       twitter: @ErikDuval
               21

More Related Content

PDF
20111014 mu me_j_querymobile
PDF
jQuery (MeshU)
PDF
Processing and Processing.js
PDF
You're Doing it Wrong - WordCamp Orlando
PDF
You're Doing it Wrong - WordCamp Atlanta
PDF
jQuery in the [Aol.] Enterprise
PDF
jQuery - 10 Time-Savers You (Maybe) Don't Know
PDF
JavaScript 1.5 to 2.0 (TomTom)
20111014 mu me_j_querymobile
jQuery (MeshU)
Processing and Processing.js
You're Doing it Wrong - WordCamp Orlando
You're Doing it Wrong - WordCamp Atlanta
jQuery in the [Aol.] Enterprise
jQuery - 10 Time-Savers You (Maybe) Don't Know
JavaScript 1.5 to 2.0 (TomTom)

What's hot (20)

PDF
Mojolicious
PDF
Webapps without the web
PPTX
PDF
Short intro to JQuery and Modernizr
PDF
iPhone Appleless Apps
PPTX
Introduction to Jquery
PDF
Cheap frontend tricks
KEY
An in-depth look at jQuery UI
PPTX
Web apps without internet
PDF
Count to 10 and Say Yes
PDF
Javascript MVC & Backbone Tips & Tricks
PDF
jQuery UI and Plugins
PDF
jQtouch, Building Awesome Webapps
PDF
Railsbridge javascript
PPTX
YUI (Advanced)
PPT
Hack with YUI
PDF
Mojolicious: what works and what doesn't
KEY
Taking your Web App for a walk
PPTX
Auto tools
PPT
WordPress Third Party Authentication
Mojolicious
Webapps without the web
Short intro to JQuery and Modernizr
iPhone Appleless Apps
Introduction to Jquery
Cheap frontend tricks
An in-depth look at jQuery UI
Web apps without internet
Count to 10 and Say Yes
Javascript MVC & Backbone Tips & Tricks
jQuery UI and Plugins
jQtouch, Building Awesome Webapps
Railsbridge javascript
YUI (Advanced)
Hack with YUI
Mojolicious: what works and what doesn't
Taking your Web App for a walk
Auto tools
WordPress Third Party Authentication
Ad

Viewers also liked (8)

PDF
01 introduction
PDF
Mobile development
PDF
Bootstrapping iPhone Development
PDF
Handout 00 0
PDF
Assignment1 B 0
PDF
Mume HTML5 Intro
PDF
More! @ ED-MEDIA
PDF
iOS Development Introduction
01 introduction
Mobile development
Bootstrapping iPhone Development
Handout 00 0
Assignment1 B 0
Mume HTML5 Intro
More! @ ED-MEDIA
iOS Development Introduction
Ad

Similar to Mume JQueryMobile Intro (20)

PDF
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
PDF
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
PDF
JQuery UI
PDF
jQuery (DrupalCamp Toronto)
PPTX
jQuery for web development
PDF
jQuery Loves Developers - Oredev 2009
PDF
Toutch Jquery Mobile
PDF
Building iPhone Web Apps using "classic" Domino
KEY
The Inclusive Web: hands-on with HTML5 and jQuery
PDF
Write Less Do More
PPTX
Jquery fundamentals
PPTX
SharePoint and jQuery Essentials
PDF
jQuery (BostonPHP)
PDF
Multi screen HTML5
PPT
J query
PPTX
Getting started with jQuery
PDF
Web2.0 with jQuery in English
PPTX
Challenges going mobile
PPTX
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012
jQuery Makes Writing JavaScript Fun Again (for HTML5 User Group)
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
JQuery UI
jQuery (DrupalCamp Toronto)
jQuery for web development
jQuery Loves Developers - Oredev 2009
Toutch Jquery Mobile
Building iPhone Web Apps using "classic" Domino
The Inclusive Web: hands-on with HTML5 and jQuery
Write Less Do More
Jquery fundamentals
SharePoint and jQuery Essentials
jQuery (BostonPHP)
Multi screen HTML5
J query
Getting started with jQuery
Web2.0 with jQuery in English
Challenges going mobile
Oracle Application Express & jQuery Mobile - OGh Apex Dag 2012

More from Gonzalo Parra (9)

PDF
iOS Dev Intro
PDF
TiNYARM @ MATEL WS
PDF
iOS Development Introduction (MuMe11)
PDF
More! @ EC-TEL
KEY
Research2.0
KEY
More! A Social Discovery Tool for Researchers
PDF
PDF
ARIADNE LOM Application Profile
PDF
Iphone Presentation for MuMe09
iOS Dev Intro
TiNYARM @ MATEL WS
iOS Development Introduction (MuMe11)
More! @ EC-TEL
Research2.0
More! A Social Discovery Tool for Researchers
ARIADNE LOM Application Profile
Iphone Presentation for MuMe09

Mume JQueryMobile Intro

  • 1. Multimedia jQuery Mobile Erik Duval Dept. Computerwetenschappen http://www.cs.kuleuven.ac.be/~erikd/
  • 4. built on jQuery & jQuery UI 4
  • 5. built on jQuery & jQuery UI 4
  • 8. mobile events • tap • taphold • orientationchange • swipe  • scrollstart • swipeleft  • scrollstop • swiperight 7
  • 9. progressive enhancement • ‘graceful degradation’ • A-grade – Full enhanced experience with Ajax- based animated page transitions. • B-grade – Enhanced experience except without Ajax navigation features. • C-grade – Basic, non-enhanced HTML experience that is still functional • Not Officially Supported – May work, but haven’t been thoroughly tested or debugged 8
  • 10. 9
  • 11. <!DOCTYPE html> <html>   <head>   <title>jQuery Mobile: Pages within Pages</title>   <link rel="stylesheet" href="http://code.jquery.com/ mobile/1.0a1/jquery.mobile-1.0a1.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-1.0a1.min.js"></script> </head> 10
  • 12. <div data-role="page"> <div data-role="header"> <h1>Page Title</h1> </div> <div data-role="content"> <p>Page content goes here.</p> </div> <div data-role="footer"> <h4>Page Footer</h4> </div> </div> 11
  • 13. <body> <div data-role="page" id="home">   <div data-role="header"><h1>Home</h1></div>   <div data-role="content"><a href="#about">...</a></div> </div> <div data-role="page" id="about">    <div data-role="header"><h1>About This App</h1></div>   <div data-role="content">...! <a href="#home">Go</a></div> </div> </body> 12
  • 14. • “auto-ajax” to pre-fetch content pages • does not include GPS, canvas, local storage, ... 13
  • 15. transition effects • slide • slideup • slidedown • pop • fade • flip 14
  • 17. jQuery • find something in HTML • do something to it 16
  • 18. $(“#content”) get element with id content $(“li:first”) get first list item $(“tr:odd”) get odd numbered table rows $(“a[target=_blank]”) get all links who’s target is “_blank” $(“form[id^=step]”) get all forms who’s id starts with “step” Chaining $(“#myId, .myClass, table”) $(“div”).addClass(“redbox”).fadeOut(); $(...).html(function(i){return “<p>hello “ + i + “</p>”;}); 17
  • 19. methods • Moving Elements: append(), appendTo(), before(), after(), • Attributes: css(), attr(), html(), val(), addClass() • Events: bind(), trigger(), unbind(), live(), click() • Effects: show(), fadeOut(), toggle(), animate() • Traversing: find(), is(), prevAll(), next(), hasClass() • Ajax: get(), getJSON(), post(), ajax(), load() 18
  • 20. resources & thx • http://jquerymobile.com/ • http://www.jqmgallery.com/ • http://www.elated.com/articles/jquery-mobile-what-can-it-do-for-you/ • http://miamicoder.com/2011/creating-a-website-using-jquery-mobile-part1/ • http://docs.jquery.com/Tutorials • http://www.slideshare.net/1Marc/jquery-essentials 19
  • 21. Over to ... you! Start from http://miamicoder.com/2011/creating-a-website-using- jquery-mobile-part1/ or http://www.elated.com/articles/jquery-mobile-what-can- it-do-for-you/ 20