Skip to content

Commit d1d5e09

Browse files
committed
Re-vamped getting started page, changed CDN refs to 1.0, added 1.0 final banner
1 parent 98b1ed6 commit d1d5e09

File tree

5 files changed

+54
-64
lines changed

5 files changed

+54
-64
lines changed

docs/_assets/images/version.png

20 Bytes
Loading

docs/about/getting-started.html

Lines changed: 47 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -31,44 +31,44 @@ <h2>Getting Started with jQuery Mobile</h2>
3131
<p>jQuery Mobile provides a set of touch-friendly UI widgets and an AJAX-powered navigation system to support animated page transitions. Building your first jQuery Mobile page is easy, here's how:</p>
3232

3333
<h2>Create a basic page template</h2>
34-
<p>Pop open your favorite text editor and paste in the <a href="../pages/page-anatomy.html" id="" title="page-anatomy">page template</a> below. In the <code>head</code>, a meta <code>viewport</code> tag and references to jQuery, jQuery Mobile and the mobile theme stylesheet from the CDN are all you need to get started. In the <code>body</code>, add a div with a <code>data-role</code> of <code>page</code> to hold your page contents.</p>
34+
<p>Pop open your favorite text editor, paste in the <a href="../pages/page-anatomy.html" id="" title="page-anatomy">page template</a> below, save and open in a browser. You are now a mobile developer!</p>
35+
<p>Here's what's in the template. In the <code>head</code>, a meta <code>viewport</code> tag sets the screen width to the pixel width of the device and references to jQuery, jQuery Mobile and the mobile theme stylesheet from the CDN add all the styles and scripts. </p>
36+
<p>In the <code>body</code>, a div with a <code>data-role</code> of <code>page</code> is the wrapper used to delineate a page, and the header bar (<code>data-role="header"</code>) and content region (<code>data-role="content"</code>) are added inside to create a basic page (these are both optional). These <code>data-</code> attributes are HTML5 attributes are used throughout jQuery Mobile to transform basic markup into an enhanced and styled widget.</p>
3537

3638
<pre><code>
37-
<strong>&lt;!DOCTYPE html&gt;
38-
</strong>&lt;html&gt;
39-
&lt;head&gt;
40-
&lt;title&gt;Page Title&lt;/title&gt;
39+
&lt;!DOCTYPE html&gt;
40+
&lt;html&gt;
41+
&lt;head&gt;
42+
&lt;title&gt;My Page&lt;/title&gt;
43+
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
44+
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css&quot; /&gt;
45+
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.6.4.min.js&quot;&gt;&lt;/script&gt;
46+
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js&quot;&gt;&lt;/script&gt;
47+
&lt;/head&gt;
48+
&lt;body&gt;
4149

42-
<strong>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
50+
&lt;div <strong>data-role=&quot;page&quot;</strong>&gt;
4351

44-
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css&quot; /&gt;
45-
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.6.4.min.js&quot;&gt;&lt;/script&gt;
46-
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js&quot;&gt;&lt;/script&gt;</strong>
47-
&lt;/head&gt;
52+
&lt;div <strong>data-role=&quot;header&quot;</strong>&gt;
53+
&lt;h1&gt;My Title&lt;/h1&gt;
54+
&lt;/div&gt;&lt;!-- /header --&gt;
55+
56+
&lt;div <strong>data-role=&quot;content&quot;</strong>&gt;
57+
&lt;p&gt;Hello world&lt;/p&gt;
58+
&lt;/div&gt;&lt;!-- /content --&gt;
59+
60+
&lt;/div&gt;&lt;!-- /page --&gt;
4861

49-
&lt;body&gt;
50-
<strong>&lt;div data-role=&quot;page&quot;&gt;
51-
&lt;/div&gt;</strong>&lt;!-- /page --&gt;
5262
&lt;/body&gt;
5363
&lt;/html&gt;
5464
</code></pre>
5565

5666

57-
<h2>Add your HTML content</h2>
58-
<p>All the normal <a href="../content/content-html.html">HTML elements</a> and styles work as you'd expect - headings, lists, paragraphs. Write your own custom styles to create custom layouts or designs by adding a custom stylesheet to the head and just go to town. There is no required markup in your page. In fact, even the page wrapper is optional.</p>
59-
60-
<h2>Make a button</h2>
61-
<p>There are a few ways to make <a href="../buttons/buttons-types.html" title="buttons-types">buttons</a>, but lets turn a link into a button so it's easy to click. Just start with a link and add a <code>data-role="button"</code> attribute to it. These special HTML5 <code>data-</code> attributes are used throughout jQuery Mobile to transform basic markup into a widget. You can add an <a href="../buttons/buttons-icons.html">icon</a> with the <code>data-icon</code> attribute and optionally set its position with the <code>data-iconpos</code> attribute.</p>
62-
63-
<pre><code>
64-
&lt;a href=&quot;#&quot; <strong>data-role=&quot;button&quot; data-icon=&quot;star&quot;</strong>&gt;Star button&lt;/a&gt;
65-
</code></pre>
66-
67-
<a href="#" data-role="button" data-icon="star">Star button</a>
68-
67+
<h2>Add your content</h2>
68+
<p>Inside your content container, you can add all any standard <a href="../content/content-html.html">HTML elements</a> - headings, lists, paragraphs, etc. You can write your own custom styles to create custom layouts by adding an additional stylesheet to the <code>head</code> after the jQuery Mobile stylesheet.</p>
6969

7070
<h2>Make a listview</h2>
71-
<p>jQuery Mobile includes a diverse set of common <a href="../lists/docs-lists.html" id="" title="docs-lists">listviews</a> that are basically built from lists with a <code>data-role="listview"</code>. Here is a simple linked list that has a role of <code>listview</code>. We're going to make this look like an inset module by adding a <code>data-inset="true"</code> and add a dynamic search filter with, you guessed it, <code>data-filter="true"</code>.</p>
71+
<p>jQuery Mobile includes a diverse set of common <a href="../lists/docs-lists.html" id="" title="docs-lists">listviews</a> that are coded as lists with a <code>data-role="listview"</code> added. Here is a simple linked list that has a role of <code>listview</code>. We're going to make this look like an inset module by adding a <code>data-inset="true"</code> and add a dynamic search filter with the <code>data-filter="true"</code> attributes.</p>
7272

7373
<pre><code>
7474
&lt;ul <strong>data-role=&quot;listview&quot; data-inset=&quot;true&quot; data-filter=&quot;true&quot</strong>&gt;
@@ -80,7 +80,6 @@ <h2>Make a listview</h2>
8080
&lt;/ul&gt;
8181

8282
</code></pre>
83-
8483
<ul data-role="listview" data-inset="true" data-filter="true">
8584
<li><a href="#">Acura</a></li>
8685
<li><a href="#">Audi</a></li>
@@ -89,20 +88,6 @@ <h2>Make a listview</h2>
8988
<li><a href="#">Ferrari</a></li>
9089
</ul>
9190

92-
<h2>Make a collapsible block</h2>
93-
<p>It's easy to make a <a href="../content/content-collapsible.html" id="" title="content-collapsible">collapsible block</a> that can be toggled open and close to show or hide its content. Simply add the <code>data-role="collapsible"</code> attribute to a div container followed by a header element (H1-H6) and any HTML-Markup. jQuery Mobile will wrap your markup into a container, that is collapsed by default and hidden/shown when its header is clicked. Optionally you can set the content-background and border with the <code>data-content-theme</code> attribute like shown below.</p>
94-
95-
<pre><code>
96-
&lt;div <strong>data-role=&quot;collapsible&quot; data-content-theme=&quot;c&quot;</strong>&gt;
97-
&lt;h3&gt;Click me to expand!&lt;/h3&gt;
98-
&lt;p&gt;I'm the collapsible content block.&lt;/p&gt;
99-
&lt;/div&gt;
100-
</code></pre>
101-
102-
<div data-role="collapsible" data-content-theme="c">
103-
<h3>Click me to expand!</h3>
104-
<p>I'm the collapsible content block.</p>
105-
</div>
10691

10792

10893

@@ -121,25 +106,30 @@ <h2>Add a slider</h2>
121106
<input type="range" name="slider-1" id="slider-0" value="25" min="0" max="100" />
122107
</form>
123108

124-
<h2>Add a toolbar</h2>
125-
<p>Add a header <a href="../toolbars/docs-bars.html" id="" title="docs-bars">toolbar</a> by adding a div. Set the <code>data-role</code> to <code>header</code> and add a heading tag inside (any heading from H1-H6 can be used).</p>
126-
127-
<pre><code>&lt;div <strong>data-role=&quot;header&quot;</strong>&gt;
128-
&lt;h1&gt;My Page&lt;/h1&gt;
129-
&lt;/div&gt;</code></pre>
109+
110+
111+
<h2>Make a button</h2>
112+
<p>There are a few ways to make <a href="../buttons/buttons-types.html" title="buttons-types">buttons</a>, but lets turn a link into a button so it's easy to click. Just start with a link and add a <code>data-role="button"</code> attribute to it. You can add an <a href="../buttons/buttons-icons.html">icon</a> with the <code>data-icon</code> attribute and optionally set its position with the <code>data-iconpos</code> attribute.</p>
113+
114+
<pre><code>
115+
&lt;a href=&quot;#&quot; <strong>data-role=&quot;button&quot; data-icon=&quot;star&quot;</strong>&gt;Star button&lt;/a&gt;
116+
</code></pre>
117+
118+
<a href="#" data-role="button" data-icon="star">Star button</a>
119+
120+
130121

131-
<div data-role="header">
132-
<h1>My Page</h1>
133-
</div>
122+
<h2>Play with theme swatches</h2>
123+
<p>jQuery Mobile has a robust <a href="../api/themes.html" id="">theme framework</a> that supports up to 26 sets of toolbar, content and button colors, called a "swatch". Just add a <code>data-theme="e"</code> attribute to any of the widgets on this page: page, header, list, input for the slider, or button to turn it yellow. Try different swatch letters in default theme from a-e to mix and match swatches. </p>
124+
<p>Cool party trick: add the theme swatch to the page and see how all the widgets inside the content will automatically inherit the theme (headers don't inherit, they default to swatch A).</p>
134125

135-
<h2>Tweak the theme</h2>
136-
<p>Don't like black? Fine. jQuery Mobile has a robust <a href="../api/themes.html" id="">theme framework</a> that supports up to 26 sets of toolbar, content and button colors, called a "swatch". Just add a <code>data-theme="e"</code> attribute to the header div to turn it yellow. Try different swatch letters in default theme from a-e.</p>
126+
<code>&lt;a href=&quot;#&quot; data-role=&quot;button&quot; data-icon=&quot;star&quot; <strong>data-theme=&quot;a&quot;</strong>&gt;Button&lt;/a&gt;</code>
137127

138-
<div data-role="header" data-theme="e">
139-
<h1>My Page</h1>
140-
</div>
141-
142-
<p>Extra credit: try adding a <code>data-theme</code> to any of the other widgets on this page: page wrapper, buttons, lists, even the input for the slider - same deal. </p>
128+
<a href="#" data-role="button" data-icon="star" data-theme="a">data-theme="a"</a>
129+
<a href="#" data-role="button" data-icon="star" data-theme="b">data-theme="b"</a>
130+
<a href="#" data-role="button" data-icon="star" data-theme="c">data-theme="c"</a>
131+
<a href="#" data-role="button" data-icon="star" data-theme="d">data-theme="d"</a>
132+
<a href="#" data-role="button" data-icon="star" data-theme="e">data-theme="e"</a>
143133

144134
<p>When you're ready to build a custom theme, use <a href="http://www.jquerymobile.com/themeroller" rel="external">ThemeRoller</a> to drag and drop, then download a custom theme.</p>
145135

docs/pages/multipage-template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<meta charset="utf-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77
<title>Multi-page template</title>
8-
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.css" />
8+
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
99
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
10-
<script src="http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.js"></script>
10+
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
1111
</head>
1212

1313

docs/pages/page-anatomy.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ <h2>Mobile page structure</h2>
3838

3939
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
4040

41-
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.css&quot; /&gt;
41+
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css&quot; /&gt;
4242
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.6.4.min.js&quot;&gt;&lt;/script&gt;
43-
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.js&quot;&gt;&lt;/script&gt;
43+
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js&quot;&gt;&lt;/script&gt;
4444
&lt;/head&gt;
4545

4646
&lt;body&gt;
@@ -90,9 +90,9 @@ <h2>Putting it together: Basic single page template</h2>
9090

9191
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
9292

93-
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.css&quot; /&gt;
93+
&lt;link rel=&quot;stylesheet&quot; href=&quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css&quot; /&gt;
9494
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-1.6.4.min.js&quot;&gt;&lt;/script&gt;
95-
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/mobile/1.0rc3/jquery.mobile-1.0rc3.min.js&quot;&gt;&lt;/script&gt;
95+
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js&quot;&gt;&lt;/script&gt;
9696
&lt;/head&gt;
9797
&lt;body&gt;
9898

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0rc3
1+
1.0

0 commit comments

Comments
 (0)