Adding snippets, illustrator icon, updated index page.
[ReadingsJQM.git] / snippets / forms.html
1 <!doctype html>
2 <html>
3 <head>
4         <meta charset="utf-8">
5         <meta name="viewport" content="width=device-width, initial-scale=1">
6         <title> jQuery Mobile Boilerplate </title>
7         <link rel="stylesheet"  href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
8
9         <!-- if you have a custom theme, add it here -->
10         <link rel="stylesheet"  href="themes/jQuery-Mobile-Boilerplate.css" />
11
12         <link rel="stylesheet" href="css/custom.css" />
13
14         <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
15         <script src="js/application.js"></script>
16         <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
17         
18 </head> 
19 <body> 
20         <div data-role="page">
21
22                 <div data-role="header">
23                         <a href="../index.html" data-icon="home">Home</a>
24                         <h1>Forms & Elements</h1>
25                 </div>
26
27                 <div data-role="content">
28
29
30
31
32 <form action="#" method="get">
33
34         <h2>Form elements</h2>
35
36         <p>This page contains various progressive-enhancement driven form controls. Native elements are sometimes hidden from view, but their values are maintained so the form can be submitted normally. </p>
37
38         <p>Browsers that don't support the custom controls will still deliver a usable experience, because all are based on native form elements.</p>
39
40         <div data-role="fieldcontain">
41                 <label for="name">Text Input:</label>
42                 <input type="text" name="name" id="name" value=""  />
43         </div>
44
45         <div data-role="fieldcontain">
46                 <label for="textarea">Textarea:</label>
47                 <textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
48         </div>
49
50         <div data-role="fieldcontain">
51                 <label for="search">Search Input:</label>
52                 <input type="search" name="password" id="search" value=""  />
53         </div>
54
55         <div data-role="fieldcontain">
56                 <label for="slider2">Flip switch:</label>
57                 <select name="slider2" id="slider2" data-role="slider">
58                         <option value="off">Off</option>
59                         <option value="on">On</option>
60                 </select>
61         </div>
62
63         <div data-role="fieldcontain">
64                 <label for="slider">Slider:</label>
65                 <input type="range" name="slider" id="slider" value="0" min="0" max="100"  />
66         </div>
67
68         <div data-role="fieldcontain">
69                 <fieldset data-role="controlgroup">
70                         <legend>Choose as many snacks as you'd like:</legend>
71                         <input type="checkbox" name="checkbox-1a" id="checkbox-1a" class="custom" />
72                         <label for="checkbox-1a">Cheetos</label>
73
74                         <input type="checkbox" name="checkbox-2a" id="checkbox-2a" class="custom" />
75                         <label for="checkbox-2a">Doritos</label>
76
77                         <input type="checkbox" name="checkbox-3a" id="checkbox-3a" class="custom" />
78                         <label for="checkbox-3a">Fritos</label>
79
80                         <input type="checkbox" name="checkbox-4a" id="checkbox-4a" class="custom" />
81                         <label for="checkbox-4a">Sun Chips</label>
82                  </fieldset>
83         </div>
84
85         <div data-role="fieldcontain">
86                 <fieldset data-role="controlgroup" data-type="horizontal">
87                         <legend>Font styling:</legend>
88                         <input type="checkbox" name="checkbox-6" id="checkbox-6" class="custom" />
89                         <label for="checkbox-6">b</label>
90
91                         <input type="checkbox" name="checkbox-7" id="checkbox-7" class="custom" />
92                         <label for="checkbox-7"><em>i</em></label>
93
94                         <input type="checkbox" name="checkbox-8" id="checkbox-8" class="custom" />
95                         <label for="checkbox-8">u</label>
96                 </fieldset>
97         </div>
98
99         <div data-role="fieldcontain">
100                 <fieldset data-role="controlgroup">
101                         <legend>Choose a pet:</legend>
102                         <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" />
103                         <label for="radio-choice-1">Cat</label>
104
105                         <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2"  />
106                         <label for="radio-choice-2">Dog</label>
107
108                         <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3"  />
109                         <label for="radio-choice-3">Hamster</label>
110
111                         <input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4"  />
112                         <label for="radio-choice-4">Lizard</label>
113                 </fieldset>
114         </div>
115
116         <div data-role="fieldcontain">
117                 <fieldset data-role="controlgroup" data-type="horizontal">
118                         <legend>Layout view:</legend>
119                         <input type="radio" name="radio-choice-b" id="radio-choice-c" value="on" checked="checked" />
120                         <label for="radio-choice-c">List</label>
121                         <input type="radio" name="radio-choice-b" id="radio-choice-d" value="off" />
122                         <label for="radio-choice-d">Grid</label>
123                         <input type="radio" name="radio-choice-b" id="radio-choice-e" value="other" />
124                         <label for="radio-choice-e">Gallery</label>
125                 </fieldset>
126         </div>
127
128         <div data-role="fieldcontain">
129                 <label for="select-choice-1" class="select">Choose shipping method:</label>
130                 <select name="select-choice-1" id="select-choice-1">
131                         <option value="standard">Standard: 7 day</option>
132                         <option value="rush">Rush: 3 days</option>
133                         <option value="express">Express: next day</option>
134                         <option value="overnight">Overnight</option>
135                 </select>
136         </div>
137
138         <div data-role="fieldcontain">
139                 <label for="select-choice-3" class="select">Your state:</label>
140                 <select name="select-choice-3" id="select-choice-3">
141                         <option value="AL">Alabama</option>
142                         <option value="AK">Alaska</option>
143                         <option value="AZ">Arizona</option>
144                         <option value="AR">Arkansas</option>
145                         <option value="CA">California</option>
146                         <option value="CO">Colorado</option>
147                         <option value="CT">Connecticut</option>
148                         <option value="DE">Delaware</option>
149                         <option value="FL">Florida</option>
150                         <option value="GA">Georgia</option>
151                         <option value="HI">Hawaii</option>
152                         <option value="ID">Idaho</option>
153                         <option value="IL">Illinois</option>
154                         <option value="IN">Indiana</option>
155                         <option value="IA">Iowa</option>
156                         <option value="KS">Kansas</option>
157                         <option value="KY">Kentucky</option>
158                         <option value="LA">Louisiana</option>
159                         <option value="ME">Maine</option>
160                         <option value="MD">Maryland</option>
161                         <option value="MA">Massachusetts</option>
162                         <option value="MI">Michigan</option>
163                         <option value="MN">Minnesota</option>
164                         <option value="MS">Mississippi</option>
165                         <option value="MO">Missouri</option>
166                         <option value="MT">Montana</option>
167                         <option value="NE">Nebraska</option>
168                         <option value="NV">Nevada</option>
169                         <option value="NH">New Hampshire</option>
170                         <option value="NJ">New Jersey</option>
171                         <option value="NM">New Mexico</option>
172                         <option value="NY">New York</option>
173                         <option value="NC">North Carolina</option>
174                         <option value="ND">North Dakota</option>
175                         <option value="OH">Ohio</option>
176                         <option value="OK">Oklahoma</option>
177                         <option value="OR">Oregon</option>
178                         <option value="PA">Pennsylvania</option>
179                         <option value="RI">Rhode Island</option>
180                         <option value="SC">South Carolina</option>
181                         <option value="SD">South Dakota</option>
182                         <option value="TN">Tennessee</option>
183                         <option value="TX">Texas</option>
184                         <option value="UT">Utah</option>
185                         <option value="VT">Vermont</option>
186                         <option value="VA">Virginia</option>
187                         <option value="WA">Washington</option>
188                         <option value="WV">West Virginia</option>
189                         <option value="WI">Wisconsin</option>
190                         <option value="WY">Wyoming</option>
191                 </select>
192         </div>
193
194         <div data-role="fieldcontain">
195                 <label for="select-choice-a" class="select">Choose shipping method:</label>
196                 <select name="select-choice-a" id="select-choice-a" data-native-menu="false">
197                         <option>Custom menu example</option>
198                         <option value="standard">Standard: 7 day</option>
199                         <option value="rush">Rush: 3 days</option>
200                         <option value="express">Express: next day</option>
201                         <option value="overnight">Overnight</option>
202                 </select>
203         </div>
204
205         <div class="ui-body ui-body-b">
206                 <fieldset class="ui-grid-a">
207                         <div class="ui-block-a"><button type="submit" data-theme="d">Cancel</button></div>
208                         <div class="ui-block-b"><button type="submit" data-theme="a">Submit</button></div>
209                 </fieldset>
210         </div>
211 </form>
212
213
214
215
216                 </div>
217                 
218                 <div data-role="footer" data-theme="c">
219                         <p>&copy; 2012 - jQuery Mobile Boilerplate</p>
220                 </div>  
221                 
222         </div>
223 </body>
224 </html>