SlideShare una empresa de Scribd logo
1 de 30
TM




             Touch & Mobile Friendly
            Websites with jQuery Mobile




                              Brett Adler
                      FieldSync Mobile Solutions
                      www.FieldSyncMobile.com
3/16/2013                                          1
TM




 What is jQuery Mobile?

 An open-source framework that makes building
     touch-friendly sites quicker and easier.

                 A single JavaScript file (.js)
            A single Cascading Style Sheet (.css)



3/16/2013                                           2
TM




 Core Features/Benefits
• Broad cross browser support
• Touch-friendly user interface
• Themable and customizable
• AJAX navigation
• Animated transitions
• Events & Methods
• Open source
• Based on jQuery and jQuery UI
• Lightweight

3/16/2013                         3
TM




 Example – FieldSync App




3/16/2013        source: www.FieldSyncMobile.com   4
TM




 Example – Boise Valley Tech




3/16/2013        source: www.BoiseValleyTech.com   5
TM




 Example – Beacon Guides




3/16/2013        source: www.BeaconGuides.com   6
TM




 Examples




3/16/2013        source: www.jqmgallery.com   7
TM




 Examples




3/16/2013        source: www.jqmgallery.com   8
TM




 Getting Started
Simply add this to the <head> of your HTML page and you’re ready to start using it…

<!– jQuery Mobile CSS -->
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />

<!– jQuery -->
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>

<!– jQuery Mobile JavaScript -->
<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>




(you can also download the files and host them locally)


3/16/2013                                                                                     9
TM




 Minimal Markup For Mobile/Touch
Step #1: Define Type     Step #2: Set Attributes

data-role = “listview”   data-theme = “b”
data-role = “button”     data-inset = “true”
data-role = “navbar”     data-iconpos = “bottom”
data-role = “popup”      data-icon = “delete”
etc....                  etc…



3/16/2013                                          10
TM




 Minimal Markup




3/16/2013         11
TM




 Minimal Markup




3/16/2013         12
TM




 Header Bars




3/16/2013        13
TM




 Navigation Bars




3/16/2013          14
TM




 Buttons




3/16/2013        15
TM




 Lists




3/16/2013        16
TM




 Forms




3/16/2013        17
TM




 Accordions




3/16/2013        18
TM




 Side Panel




3/16/2013        19
TM




 Responsive Tables




3/16/2013            20
TM




 Responsive Grids




3/16/2013           21
TM




 Search with Autocomplete




3/16/2013                   22
TM




 Popups




3/16/2013        23
TM




 Photo Lightbox




3/16/2013         24
TM




 Themable




3/16/2013        25
TM




 Events
jQuery Mobile provides a variety of events to help with development.

•     Tap / Taphold
•     Swipe / Swipe Left / Swipe Right
•     Mouse Over / Mouse Up / Mouse Down
•     Orientation Change
•     Scroll Start / Scroll Stop
•     Page Hide / Page Show
•     Page Load / Page Before Load / Page Load Failed
•     Page Change / Page Before Change / Page Change Failed
•     Page Create / Page Before Create / Page Init


3/16/2013                                                              26
TM




 Event Examples
Before the Page is Created                             After the Page Shows
$("#Home").live( 'pagebeforecreate',function(event){   $("#Home").live( 'pageshow',function(event){

      var html = „<ul id=“participantList”                   showStatus(„Loading…‟);
                   data-role=“listview”></ul>‟;
                                                             var dataSet = getData();
      $(„#Home‟).html(html);                                 var listElements = „‟;

});                                                          $.each( dataSet, function(index, row) {
                                                                 listElements += „<li>‟ + row.title + „</li>‟;
                                                             });

                                                             $(„#participantList‟).html(listElements ).listview(„refresh‟);

                                                             hideStatus();

                                                       });




3/16/2013                                                                                                                     27
TM




 Event Examples
Swipes & Taps
$(“#Home").bind("swiperight",function(){
    $.mobile.changePage("participant_info.html“, {transition: ”fade”});
});

$(“#Home").bind("swiperight",function(){
    $.mobile.changePage(“logs.html“, {transition: ”slide”});
});

$(“#Home").bind(“tap",function(){
    $.mobile.changePage(“participant_info.html“, {transition: ”slideup”});
});

$(“#Home").bind(“taphold",function(){
    $.mobile.changePage(“logs.html“, {transition: ”none”});
});


3/16/2013                                                                    28
TM




 Resources
• www.jQueryMobile.com
• api.jquerymobile.com
• view.jquerymobile.com/1.3.0




3/16/2013                       29
TM




                               Brett Adler
                               Software Developer

                               Work
                               Brett.Adler@FieldSyncMobile.com
                               www.FieldSyncMobile.com

                               Personal
                               Brett@BeaconGuides.com
                               www.BeaconGuides.com

 Get this presentation:

 http://slidesha.re/111jfw5

 http://www.slideshare.net/BrettAdler1/touchmobile-websites-with-jquery-mobile-boise-code-camp-2013


3/16/2013                                                                                             30

Más contenido relacionado

Destacado

Inf.artritler (fazlası için www.tipfakultesi.org)
Inf.artritler (fazlası için www.tipfakultesi.org)Inf.artritler (fazlası için www.tipfakultesi.org)
Inf.artritler (fazlası için www.tipfakultesi.org)
www.tipfakultesi. org
 
Group Web Presentation: Week 10
Group Web Presentation: Week 10Group Web Presentation: Week 10
Group Web Presentation: Week 10
Tarou
 
Scholarly crew story book survey results
Scholarly crew story book survey resultsScholarly crew story book survey results
Scholarly crew story book survey results
XiaofangZhang
 
Mfv ren ch.4
Mfv ren ch.4Mfv ren ch.4
Mfv ren ch.4
65swiss
 
3 proj plan notes
3 proj plan notes3 proj plan notes
3 proj plan notes
Tony
 

Destacado (17)

Inf.artritler (fazlası için www.tipfakultesi.org)
Inf.artritler (fazlası için www.tipfakultesi.org)Inf.artritler (fazlası için www.tipfakultesi.org)
Inf.artritler (fazlası için www.tipfakultesi.org)
 
02 meme ide
02 meme ide02 meme ide
02 meme ide
 
Forschergruppe Klostermedizin (English)
Forschergruppe Klostermedizin (English)Forschergruppe Klostermedizin (English)
Forschergruppe Klostermedizin (English)
 
Group Web Presentation: Week 10
Group Web Presentation: Week 10Group Web Presentation: Week 10
Group Web Presentation: Week 10
 
인터넷마케팅 과제
인터넷마케팅 과제인터넷마케팅 과제
인터넷마케팅 과제
 
Scholarly crew story book survey results
Scholarly crew story book survey resultsScholarly crew story book survey results
Scholarly crew story book survey results
 
Mfv ren ch.4
Mfv ren ch.4Mfv ren ch.4
Mfv ren ch.4
 
Equilibrio, la solucion a la crisis
Equilibrio, la solucion a la crisisEquilibrio, la solucion a la crisis
Equilibrio, la solucion a la crisis
 
21,5” LED Widescreen WVA (I2276)
21,5” LED Widescreen WVA (I2276)21,5” LED Widescreen WVA (I2276)
21,5” LED Widescreen WVA (I2276)
 
Expo anna
Expo annaExpo anna
Expo anna
 
M3 Sistema de rastreo vehicular
M3 Sistema de rastreo vehicularM3 Sistema de rastreo vehicular
M3 Sistema de rastreo vehicular
 
La vida de hitler
La vida de hitlerLa vida de hitler
La vida de hitler
 
Jusurupp
JusuruppJusurupp
Jusurupp
 
3 proj plan notes
3 proj plan notes3 proj plan notes
3 proj plan notes
 
Desigualdades raciales
Desigualdades racialesDesigualdades raciales
Desigualdades raciales
 
Ficha de leitura - Joana Priscila
Ficha de leitura - Joana PriscilaFicha de leitura - Joana Priscila
Ficha de leitura - Joana Priscila
 
Actividad semana santa
Actividad semana santaActividad semana santa
Actividad semana santa
 

Similar a Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013

Jquery Best Practices
Jquery Best PracticesJquery Best Practices
Jquery Best Practices
brinsknaps
 
Intro to Web Apps using HTML5 and Javascript
Intro to Web Apps using HTML5 and JavascriptIntro to Web Apps using HTML5 and Javascript
Intro to Web Apps using HTML5 and Javascript
Brian Hogg
 
HTML5 and Mobile
HTML5 and MobileHTML5 and Mobile
HTML5 and Mobile
doodoofish
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
Justin Cataldo
 

Similar a Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013 (20)

Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...
Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...
Design Patterns for JavaScript Web Apps - JavaScript Conference 2012 - OPITZ ...
 
Angular directive filter and routing
Angular directive filter and routingAngular directive filter and routing
Angular directive filter and routing
 
Jquery Best Practices
Jquery Best PracticesJquery Best Practices
Jquery Best Practices
 
jQuery Mobile and JavaScript
jQuery Mobile and JavaScriptjQuery Mobile and JavaScript
jQuery Mobile and JavaScript
 
jQuery Mobile
jQuery MobilejQuery Mobile
jQuery Mobile
 
Lessons Learned: Migrating Tests to Selenium v2
Lessons Learned: Migrating Tests to Selenium v2Lessons Learned: Migrating Tests to Selenium v2
Lessons Learned: Migrating Tests to Selenium v2
 
Intro to Web Apps using HTML5 and Javascript
Intro to Web Apps using HTML5 and JavascriptIntro to Web Apps using HTML5 and Javascript
Intro to Web Apps using HTML5 and Javascript
 
jQuery Mobile with HTML5
jQuery Mobile with HTML5jQuery Mobile with HTML5
jQuery Mobile with HTML5
 
Mobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScriptMobile HTML, CSS, and JavaScript
Mobile HTML, CSS, and JavaScript
 
HTML5 and Mobile
HTML5 and MobileHTML5 and Mobile
HTML5 and Mobile
 
Jquery optimization-tips
Jquery optimization-tipsJquery optimization-tips
Jquery optimization-tips
 
Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010Making your site mobile-friendly - DevCSI Reading 21.07.2010
Making your site mobile-friendly - DevCSI Reading 21.07.2010
 
jQuery Performance Rules
jQuery Performance RulesjQuery Performance Rules
jQuery Performance Rules
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
 
A Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETA Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NET
 
YUI 3
YUI 3YUI 3
YUI 3
 
#NewMeetup Performance
#NewMeetup Performance#NewMeetup Performance
#NewMeetup Performance
 
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
A Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NETA Rich Web Experience with jQuery, Ajax and .NET
A Rich Web Experience with jQuery, Ajax and .NET
 

Último

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 

Último (20)

ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptxBT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
BT & Neo4j _ How Knowledge Graphs help BT deliver Digital Transformation.pptx
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 

Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013

  • 1. TM Touch & Mobile Friendly Websites with jQuery Mobile Brett Adler FieldSync Mobile Solutions www.FieldSyncMobile.com 3/16/2013 1
  • 2. TM What is jQuery Mobile? An open-source framework that makes building touch-friendly sites quicker and easier. A single JavaScript file (.js) A single Cascading Style Sheet (.css) 3/16/2013 2
  • 3. TM Core Features/Benefits • Broad cross browser support • Touch-friendly user interface • Themable and customizable • AJAX navigation • Animated transitions • Events & Methods • Open source • Based on jQuery and jQuery UI • Lightweight 3/16/2013 3
  • 4. TM Example – FieldSync App 3/16/2013 source: www.FieldSyncMobile.com 4
  • 5. TM Example – Boise Valley Tech 3/16/2013 source: www.BoiseValleyTech.com 5
  • 6. TM Example – Beacon Guides 3/16/2013 source: www.BeaconGuides.com 6
  • 7. TM Examples 3/16/2013 source: www.jqmgallery.com 7
  • 8. TM Examples 3/16/2013 source: www.jqmgallery.com 8
  • 9. TM Getting Started Simply add this to the <head> of your HTML page and you’re ready to start using it… <!– jQuery Mobile CSS --> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" /> <!– jQuery --> <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <!– jQuery Mobile JavaScript --> <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script> (you can also download the files and host them locally) 3/16/2013 9
  • 10. TM Minimal Markup For Mobile/Touch Step #1: Define Type Step #2: Set Attributes data-role = “listview” data-theme = “b” data-role = “button” data-inset = “true” data-role = “navbar” data-iconpos = “bottom” data-role = “popup” data-icon = “delete” etc.... etc… 3/16/2013 10
  • 22. TM Search with Autocomplete 3/16/2013 22
  • 26. TM Events jQuery Mobile provides a variety of events to help with development. • Tap / Taphold • Swipe / Swipe Left / Swipe Right • Mouse Over / Mouse Up / Mouse Down • Orientation Change • Scroll Start / Scroll Stop • Page Hide / Page Show • Page Load / Page Before Load / Page Load Failed • Page Change / Page Before Change / Page Change Failed • Page Create / Page Before Create / Page Init 3/16/2013 26
  • 27. TM Event Examples Before the Page is Created After the Page Shows $("#Home").live( 'pagebeforecreate',function(event){ $("#Home").live( 'pageshow',function(event){ var html = „<ul id=“participantList” showStatus(„Loading…‟); data-role=“listview”></ul>‟; var dataSet = getData(); $(„#Home‟).html(html); var listElements = „‟; }); $.each( dataSet, function(index, row) { listElements += „<li>‟ + row.title + „</li>‟; }); $(„#participantList‟).html(listElements ).listview(„refresh‟); hideStatus(); }); 3/16/2013 27
  • 28. TM Event Examples Swipes & Taps $(“#Home").bind("swiperight",function(){ $.mobile.changePage("participant_info.html“, {transition: ”fade”}); }); $(“#Home").bind("swiperight",function(){ $.mobile.changePage(“logs.html“, {transition: ”slide”}); }); $(“#Home").bind(“tap",function(){ $.mobile.changePage(“participant_info.html“, {transition: ”slideup”}); }); $(“#Home").bind(“taphold",function(){ $.mobile.changePage(“logs.html“, {transition: ”none”}); }); 3/16/2013 28
  • 29. TM Resources • www.jQueryMobile.com • api.jquerymobile.com • view.jquerymobile.com/1.3.0 3/16/2013 29
  • 30. TM Brett Adler Software Developer Work Brett.Adler@FieldSyncMobile.com www.FieldSyncMobile.com Personal Brett@BeaconGuides.com www.BeaconGuides.com Get this presentation: http://slidesha.re/111jfw5 http://www.slideshare.net/BrettAdler1/touchmobile-websites-with-jquery-mobile-boise-code-camp-2013 3/16/2013 30