From e604a61f1f4aaf53408f387c97b83cb7177f0737 Mon Sep 17 00:00:00 2001 From: maggiewachs Date: Wed, 28 Sep 2011 16:02:34 -0400 Subject: [PATCH] removed old file --- docs/forms/forms-switch.html | 102 ----------------------------------- 1 file changed, 102 deletions(-) delete mode 100755 docs/forms/forms-switch.html diff --git a/docs/forms/forms-switch.html b/docs/forms/forms-switch.html deleted file mode 100755 index 12764fec..00000000 --- a/docs/forms/forms-switch.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - jQuery Mobile Docs - Flip switch - - - - - - - - - -
- -
-

Flip switch

-
- -
-
- -
- -

Flip toggle switches

-

A binary "flip" switch is a common UI element on mobile devices that is used for any binary on/off or true/false type of data input. You can either drag the flip handle like a slider or tap on each half of the switch.

-

To create a flip toggle, To add a slider widget to your page, start with an select with two options. The first option will be styled as the "on" state switch and the second will be styled as the "off" state so write your options in the correct order. Set the for attribute of the label to match the ID of the input so they are semantically associated and wrap them in a div with the data-role="fieldcontain" attribute to group them.

- -
	
-<div data-role="fieldcontain">
-	<label for="slider">Select slider:</label>
-	<select name="slider" id="slider" data-role="slider">
-		<option value="off">Off</option>
-		<option value="on">On</option>
-	</select> 
-</div>
-
-

The flip toggle switch is displayed like this:

-
- - -
- - - -

Refreshing a flip switch

- -

If you manipulate a flip switch via JavaScript, you must call the refresh method on it to update the visual styling. Here is an example:

- -
-var myswitch = $("select#bar");
-myswitch[0].selectedIndex = 1;
-myswitch .slider("refresh");
-
- -
- -
- - - -
- - - -
- - - -