Creating radio buttons with jQuery Mobile

A simple example of creating radio buttons with jQuery Mobile.
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="jQuery example for Tizen"/>
    
    <title>jQuery Mobile example for Tizen</title>
    
    <link rel="stylesheet" href="./css/jquery.mobile-1.3.2.css"/>
 
    <script type="text/javascript" src="./js/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="./js/jquery.mobile-1.3.2.js"></script>

    <style>
    </style>
</head>

<body>

<fieldset data-role="controlgroup" data-mini="true">
    	<input type="radio" name="radio" id="radio1" value="choice1" checked="checked" />
    	<label for="radio1">Plane</label>

	<input type="radio" name="radio" id="radio2" value="choice2"  />
    	<label for="radio2">Car</label>
    	
    	<input type="radio" name="radio" id="radio3" value="choice3"  />
    	<label for="radio3">Ship</label>
</fieldset>

<script>
</script>

</body>
</html>

Responses

0 Replies