You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/about/getting-started.html
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ <h2>Getting Started with jQuery Mobile</h2>
30
30
31
31
<p>jQuery Mobile provides a set of touch-friendly UI widgets and AJAX-powered navigation system to support animated page transitions. Building your first jQuery Mobile page is easy, here's how:</p>
32
32
33
-
<h3>Create a basic page template</h3>
33
+
<h2>Create a basic page template</h2>
34
34
<p>Pop open your favorite text editor and paste in the <ahref="../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>
35
35
36
36
<pre><code>
@@ -54,10 +54,10 @@ <h3>Create a basic page template</h3>
54
54
</code></pre>
55
55
56
56
57
-
<h3>Add your HTML content</h3>
57
+
<h2>Add your HTML content</h2>
58
58
<p>All the normal <ahref="../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
59
60
-
<h3>Make a button</h3>
60
+
<h2>Make a button</h2>
61
61
<p>There are a few ways to make a <ahref="../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 the link. These are special HTML5 <code>data-</code> attributes used throughout jQuery Mobile to transform basic markup into a widget. Add an <ahref="../buttons/buttons-icons.html">icon</a> with the <code>data-icon</code> attribute.</p>
<p>jQuery Mobile includes a diverse set of common <ahref="../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 filer with, you guessed it, <code>data-filter="true"</code>.</p>
72
72
73
73
<pre><code>
@@ -89,7 +89,7 @@ <h3>Make a listview</h3>
89
89
<li><ahref="#">Ferrari</a></li>
90
90
</ul>
91
91
92
-
<h3>Make a collapsible block</h3>
92
+
<h2>Make a collapsible block</h2>
93
93
<p>It's easy to make a collapsible block that toggles open and closed <ahref="../content/content-collapsible.html" id="" title="content-collapsible">content-collapsible</a>jQuery Mobile includes a diverse set of common <ahref="../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 filer with, you guessed it, <code>data-filter="true"</code>.</p>
94
94
95
95
<pre><code>
@@ -106,7 +106,7 @@ <h3>Click me to expand!</h3>
106
106
107
107
108
108
109
-
<h3>Add a slider</h3>
109
+
<h2>Add a slider</h2>
110
110
<p>The framework contains a full set of <ahref="../forms/forms-all.html">form elements</a> that automatically are enhanced into touch-friendly styled widgets. Here's a slider made with the new HTML5 input type of range, no <code>data-role</code> needed. Be sure to wrap these in a <code>form</code> element and always properly associate a <code>label</code> to every form element.</p>
<p>Add a header <ahref="../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>
<p>Don't like black? Fine. jQuery Mobile has robust a <ahref="../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>
137
137
138
138
<divdata-role="header" data-theme="e">
@@ -143,7 +143,7 @@ <h1>My Page</h1>
143
143
144
144
<p>When you're ready to build a custom theme, use <ahref="http://www.jquerymobile.com/themeroller" rel="external">ThemeRoller</a> to drag and drop, then download a custom theme.</p>
145
145
146
-
<h3>Go forth and build stuff</h3>
146
+
<h2>Go forth and build stuff</h2>
147
147
<p>This is just scratching the surface of all the cool things you can build with jQuery Mobile with little effort. Be sure to explore <ahref="../pages/page-links.html" id="" title="page-links">linking pages</a>, <ahref="../pages/page-transitions.html" id="" title="page-transitions">adding animated page transitions</a>, and <ahref="../pages/page-dialogs.html" id="" title="page-dialogs">creating dialogs</a>. Use the <ahref="../api/data-attributes.html" id="" title="data-attributes">data-attribute reference</a> to try out some of the other <code>data-</code> attributes you can play with. </p>
148
148
149
149
<p><strong>More of a developer?</strong> Great, forget everything we just covered (kidding). If you don't want to use the <code>data-</code> attribute configuration system, you can take full control of everything and call plugins directly because these are all just standard jQuery plugins built with the UI widget factory. Be sure to dig into <ahref="../api/globalconfig.html" id="" title="globalconfig">global configuration</a>, <ahref="../api/events.html" id="" title="events">events</a>, and <ahref="../api/methods.html" id="" title="methods">methods</a>. Then read up on <ahref="../pages/page-scripting.html" id="" title="page-scripting">scripting pages</a>, <ahref="../pages/page-dynamic.html" id="" title="page-dynamic">generating dynamic pages</a>, and <ahref="../pages/phonegap.html" id="" title="phonegap">building PhoneGap apps</a>.</p>
0 commit comments