Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
jquery mobile
Search
Andreas Bjärlestam
May 25, 2011
Technology
75
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jquery mobile
Andreas Bjärlestam
May 25, 2011
More Decks by Andreas Bjärlestam
See All by Andreas Bjärlestam
Climate compensate with a pull request
bjarlestam
0
46
Agile performance testing
bjarlestam
0
120
SPDY and HTTP2
bjarlestam
1
1.3k
SPDY or maybe HTTP2.0
bjarlestam
4
70
Devise - taking care of your users
bjarlestam
0
78
REST with JAX-RS
bjarlestam
1
97
REST
bjarlestam
2
170
Other Decks in Technology
See All in Technology
AIチャットの改善から見えた、良いAI体験とは / What Constitutes a Good AI Experience: Insights from Improving AI Chat
kubode
0
120
Agile and AI Redmine Japan 2026
hiranabe
4
460
AI時代のコスト管理を考えよう〜明日から使える実践AWSノウハウ~
yoshimi0227
0
830
MUSUBI 田中裕一『AIと共に行う「しごとのリデザイン」- スモールバックオフィス編』AI Ops Lab #4
musubi
0
310
SONiC Scale-Up Working Group から探る Scale-UpやUltraEthernet機能の実装方法
ebiken
PRO
2
470
【2026年版】 ベクトル検索とEmbedding最前線
mocobeta
23
7.3k
LayerX コーポレートエンジニアリング室におけるサプライチェーンセキュリティへの取り組み / Supply Chain Security at LayerX Corporate Engineering
yuyatakeyama
3
820
サイバーエージェントにおけるAI推進戦略と変革への取り組み
shotatsuge
0
460
現場のトークンマネジメント
dak2
1
170
PostgreSQL 19 新機能概要 OSC Hokkaido 2026
nori_shinoda
0
230
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
110
入門!AWS Blocks
ysuzuki
1
180
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
170
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
210
Designing for Timeless Needs
cassininazir
1
260
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
GitHub's CSS Performance
jonrohan
1033
470k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
580
HDC tutorial
michielstock
2
720
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Transcript
Andreas Bjärlestam! 2011-05-25!
Web vs Apps • Referral traffic is lost with
Apps • Google does not index Apps • Customers are already going to the website • Cross device • Apps are in the hands of pla>orm vendors
Frameworks Frameworks Frameworks
For building mobile applicaAons with web technology For
building mobile friendly websites
Features • HTML5 based • Progressive enhancement
– Works in less capable browsers but with limited features • Accessibility – Designed to work with screen readers – WAI-‐ARIA
jQuery means JavaScript right?
Well… not in this case jQuery-‐mobile development is mostly
about markup
Pages
None
Simple page example <div data-role="page" id="home"> <div data-role="header"> <h1>Page
header</h1> </div> <div data-role="content"> <h3>Hi!</h3> <p>This is a simple page made with jquery mobile</p> </div> <div data-role="footer"> <h4>Page Footer</h4> </div> </div>
Page navigaAon
UI elements List views BuSons Dialogs
Popup menus Sliders Checkboxes
<form action="form.php" method="post"> <label for="slider">Slider: </label> <input type="number" data-type="range” name="slider"
id="slider" min="40" max="80" value="50"/> <label for="q">Search: </label> <input data-type="search" name="q" id="q"/> <fieldset data-role="controlgroup"> <legend>Choose many:</legend> <input type="checkbox" name="checkbox-1" id="checkbox-1" /> <label for="checkbox-1">Option 1</label> <input type="checkbox" name="checkbox-2" id="checkbox-2" /> <label for="checkbox-2">Option 2</label> <input type="checkbox" name="checkbox-3" id="checkbox-3" /> <label for="checkbox-3">Option 3</label> </fieldset> <label for=”switch">Flip switch:</label> <select name=”switch" id=”switch" data-role="slider"> <option value="off">Off</option> <option value="on">On</option> </select> </form>
Page transiAons Slide Flip Pop Fade
Slide up Slide down
How are these nice effects done?
CSS transforms • GPU accelerated • Compact code
= efficient • Currently only implemented for webkit
.flip { -webkit-animation-name: flipinfromleft; -webkit-animation-timing-function: ease-in-out; -webkit-animation-duration: 2s; } @-webkit-keyframes
flipinfromleft { from { -webkit-transform: rotateY(180deg); } to { -webkit-transform: rotateY(0); } }
How can we handle all these phones?
Progressive Enhancement
None
Performance in the mobile environment
Bandwidth vs Latency
Bandwidth Latency source: hSp://www.belshe.com/2010/05/24/more-‐bandwidth-‐doesnt-‐maSer-‐much/
Latency is bad for wireless
Reduce roundtrips to fight latency
How does jQuery Mobile handle this?
How jQuery fights Latency • Gradients and shadows with
CSS3 – No background-‐images to load • Image icons in css-‐sprite • And…
Remember WAP and WML? The Card Deck
jQuery mobile supports mulAple pages in a single html
document
JavaScript Event-‐listeners tap taphold swipe swipelea
swiperight orientaAonchange scrollstart scrollstop
Events -‐ examples $('#tapMe').tap(function(e) { alert('tap!' ); }); $('#home').swipeleft(function(e)
{ alert('swipe left!' ); });
Theming • Object oriented CSS • Similar to
jQuery-‐UI • CSS3 to minify footprint – Rounded corners – Shadows – Gradients • Color “swatches” – A theme includes several color schemes that can be applied on different content
data-‐theme=“b” data-‐theme=“a” data-‐theme=“e”
Andreas Bjärlestam mailto:
[email protected]
hSp://twiSer.com/bjarlestam
ASribuAon • hSp://www.flickr.com/photos/brdavids/2699221787 • hSp://www.slideshare.net/bryanrieger/rethinking-‐the-‐mobile-‐web-‐by-‐yiibu • hSp://www.belshe.com/2010/05/24/more-‐bandwidth-‐doesnt-‐maSer-‐much