Working with mini fields
In the previous examples, we saw how jQuery Mobile automatically enhanced form fields to make them easier on smaller touch-based devices. In general, jQuery Mobile took your fields and made them nice and fat. While that's desirable most of the time, you may want to put your form fields on a bit of a diet. This is especially true for placing form fields in a header or footer. jQuery Mobile supports an attribute on any form field that creates a smaller version of the field: data-mini="true"
. The following code snippet is a complete example:
<div class="ui-field-contain"> <label for="name">Name:</label> <input type="search" name="name" id="name" value="" /> </div> <div class="ui-field-contain"> <label for="name">Name (Slim):</label> <input type="search" name="name" id="name" value="...