Introduction to jQuery Mobile - Web Deliver for All
- 17. Fully Supported
•
•
•
•
•
•
•
iOs 3.2+, Android 2.1+/Honeycomb
Windows Phone 7
Blackberry 6.0/Playbook
Palm WebOS 1.4+
Mobile Opera & Mobile Firefox
Amazon Kindle 3 & Fire
Desktop Chrome, FF, IE 7+, Opera
- 23. Two popular mobile frameworks
“Web First”
“App First”
http://www.google.com/trends/?q=jquery+mobile,+sencha,+dojo
+mobile,+jqmobi
- 27. Get the
(Coding)Party
Including Latest:
!
<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>
http://jquerymobile.com/download/
- 31. Auto-Ajax
Links
1. Ajax gets href=”page.html”
(unless data-ajax=false)
2. Slides in New Content
3. Updates URL
(with <body>...</body>
or data-role=page)
- 38. Pages w/out Ajax
<div data-roll=page
id=page1>...</div>
<div data-roll=page
id=page2>...</div>
!
<a href=”#page1”>Page 1</a>
<a href=”#page2”>Page 2</a>
http://jquerymobile.com/demos/1.2.0/docs/pages/multipagetemplate.html
- 41. I don’t use auto-ajax
forms. Disable with
data-ajax=false
- 49. Listview
<ul data-role=listview ...>
<li data-role=list-divider>...</li>
<li><a href=”...”></a></li>
<li><a href=”...”></a></li>
<li><a href=”...”></a></li>
<li><a href=”...”></a></li>
<li><a href=”...”></a></li>
...
</ul>
- 54. e.g. Docs Theming
<ul data-inset=true
data-dividertheme=b ...>
<ul data-inset=true
data-dividertheme=f ...>
- 58. Buttons
Link as a button
<a data-role=button ...>slidedown</a>
http://jquerymobile.com/demos/1.2.0/docs/buttons/buttonstypes.html
- 93. jQuery Mobile Router
var approuter = new $.mobile.Router([
{ "#certainPage": { handler: "foo", events: "s" } },
{ "#certainPage": { handler: "bar", events: "h" } }
], {
foo: function(...){...},
bar: function(...){...}
}, options);
https://github.com/azicchetti/jquerymobile-router