Book Image

jQuery Mobile First Look

Book Image

jQuery Mobile First Look

Overview of this book

Table of Contents (17 chapters)
jQuery Mobile First Look
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Sliders and select menus


At last, we're going to see how sliders and the select menu work and how they can be modified to suit our needs.

These are two of the most versatile elements we can include in a form, due to their flexible nature; we can use sliders to select a value from a range of numbers, and select menus are traditionally used to select shipping methods or some similar kind of information.

Sliders

Slider elements have been introduced recently by the HTML5 standard and are a particular UI element that, once you have specified the minimum and maximum values, lets the user choose one of those values in-between.

To create a slider, add a type="range" attribute to an input element.

We then specify the min and max attributes, as well as the value attribute, which represent the position the track handle starts in:

<div data-role="fieldcontain">
        <label for="slider">Input slider:</label>
        <input type="range" name="myslider1" id="myslider1" value="50" min...