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