tdreyno / iphone-style-checkboxes

Turn your checkboxes into iPhone-style binary switches

This URL has Read+Write access

tdreyno (author)
Fri Jun 19 13:02:31 -0700 2009
commit  0cab0f0ef41ba61c0acb73fe383b1fa86af7fa0b
tree    a3c0e2819f88097c41bec92d1538659d823be5f4
parent  1f5118903c3e2bae27b706a4b172c21d40644372
iphone-style-checkboxes / prototype-demo.html
100644 23 lines (22 sloc) 0.925 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>iPhone Style Radios Demo</title>
  <script src="prototype/prototype-1.6.0.3.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" />
  <script type="text/javascript" charset="utf-8">
    document.observe("dom:loaded", function() {
      new iPhoneStyle('input[type=checkbox]');
    });
  </script>
</head>
<body>
  <h2>Off by default</h2>
  <input type="checkbox" />
  
  <h2>On by default</h2>
  <input type="checkbox" checked="checked" />
</body>
</html>