WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

jQuery Mobile Form Sliders


jQuery Mobile Slider Controls

A slider enables you to choose an incentive from a scope of numbers:

To make a slider, use <input type="range">:

Example

<form method="post" action="demoform.asp">
  <label for="points">Points:</label>
  <input type="range" name="points" id="points" value="50" min="0" max="100">
</form>
Try it yourself »

Use the accompanying ascribes to indicate restrictions:

  • max - indicates the greatest esteem allowed
  • min - indicates the base esteem allowed
  • step - determines the lawful number intervals
  • value - determines the default value

Tip: If you need to demonstrate the incentive on the slider catch, include information show-value="true":

Example

<input type="range" data-show-value="true">
Try it yourself »

Tip: If you need to the incentive to spring up on your screen like a tooltip (as you slide), include information popup-enabled="true":

Example

<input type="range" data-popup-enabled="true">
Try it yourself »

Tip: If you need to feature the track up to the slider esteem, include information highlight="true":

Example

<input type="range" data-highlight="true">
Try it yourself »

Flip Toggle Switch

A flip switch is regularly utilized for on/off or genuine/false buttons:

To make a flip switch, use <input type="checkbox"> and determine an information job of "flipswitch":

Example

<form method="post" action="demoform.asp">
  <label for="switch">Flip flip switch checkbox:</label>
    <input type="checkbox" information role="flipswitch" name="switch" id="switch">
</form>
Try it yourself »

By default, the content on the flip switch is "On" and "Off". Utilize the information on-content and information off-content credits to change this:

Example

<input type="checkbox" information role="flipswitch" name="switch" id="switch" data-on-text="True" information off-text="False">
Try it yourself »

Tip: Use the "checked" credit to set one of the choices to be pre-selected:

Example

<input type="checkbox" information role="flipswitch" name="switch" id="switch" checked>
Try it yourself »

Range slider
The most effective method to make a slider with two handles, enabling clients to indicate a base and greatest esteem in a range.

Style Flip Switch
Instructions to do the flip switch wider.