Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: ae47bb8bcb
Fetching contributors…

Cannot retrieve contributors at this time

92 lines (85 sloc) 2.869 kB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>iPhone Style Radios Demo</title>
<script src="prototype/prototype.js" type="text/javascript" charset="utf-8"></script>
<script src="prototype/scriptaculous.js" type="text/javascript" charset="utf-8"></script>
<script src="prototype/iphone-style-checkboxes.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" charset="utf-8" />
<style type="text/css">
body {
padding: 10px;
label.left {
float: left;
padding: 4px;
padding-right: 15px;
.css_sized_container .iPhoneCheckContainer {
width: 250px;
ol {
list-style-type: none;
margin: 0;
padding: 0;
ol li {
padding: 10px;
margin: 0;
.onchange input {
opacity: 1 !important;
left: 100px;
.onchange .iPhoneCheckContainer {
overflow: visible;
<script type="text/javascript" charset="utf-8">
document.observe("dom:loaded", function() {
new iPhoneStyle('.on_off input[type=checkbox]');
new iPhoneStyle('.css_sized_container input[type=checkbox]', { resizeContainer: false, resizeHandle: false });
new iPhoneStyle('.long_tiny input[type=checkbox]', { checkedLabel: 'Very Long Text', uncheckedLabel: 'Tiny' });
var onchange_checkbox = $$('.onchange input[type=checkbox]').first();
new iPhoneStyle(onchange_checkbox);
setInterval(function toggleCheckbox() {
onchange_checkbox.writeAttribute('checked', !onchange_checkbox.checked);
}, 2500);
<ol class="on_off">
<label class="left" for="on_off">Default</label>
<input type="checkbox" id="on_off" />
<label class="left" for="on_off_on">Default On</label>
<input type="checkbox" checked="checked" id="on_off_on"/>
<ol class="css_sized_container">
<label class="left" for="css_sized_container">CSS Sized Container and Handle</label>
<input type="checkbox" id="css_sized_container"/>
<ol class="long_tiny">
<label class="left" for="long_tiny">Long and short labels</label>
<input type="checkbox" id="long_tiny"/>
<ol class="onchange">
<input type="checkbox" id="onchange"/>
<br />
<p>Checkbox status is <strong><span id="status">...</span></strong>.</p>
Jump to Line
Something went wrong with that request. Please try again.