1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>
3
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4
<meta name="viewport" id="iphone-viewport" content="minimum-scale=1.0, maximum-scale=1.0, width=device-width" />
5
<meta name="apple-mobile-web-app-capable" content="yes" />
7
<link rel="stylesheet" href="spinningwheel.css" type="text/css" media="all" />
8
<script type="text/javascript" src="spinningwheel-min.js?v=1.4"></script>
10
<title>Spinning Wheel for iPhone/iPod touch</title>
12
<script type="text/javascript">
13
function openWeight() {
15
var numbers = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9 };
16
SpinningWheel.addSlot(numbers, 'right');
17
SpinningWheel.addSlot(numbers, 'right');
18
SpinningWheel.addSlot(numbers, 'right');
19
SpinningWheel.addSlot({ separator: '.' }, 'readonly shrink');
20
SpinningWheel.addSlot(numbers, 'right');
21
SpinningWheel.addSlot({ Kg: 'Kg', Lb: 'Lb', St: 'St' }, 'shrink');
23
SpinningWheel.setCancelAction(cancel);
24
SpinningWheel.setDoneAction(done);
29
function openBirthDate() {
33
var months = { 1: 'Gen', 2: 'Feb', 3: 'Mar', 4: 'Apr', 5: 'May', 6: 'Jun', 7: 'Jul', 8: 'Aug', 9: 'Sep', 10: 'Oct', 11: 'Nov', 12: 'Dec' };
35
for( var i = 1; i < 32; i += 1 ) {
39
for( i = now.getFullYear()-100; i < now.getFullYear()+1; i += 1 ) {
43
SpinningWheel.addSlot(years, 'right', 1999);
44
SpinningWheel.addSlot(months, '', 4);
45
SpinningWheel.addSlot(days, 'right', 12);
47
SpinningWheel.setCancelAction(cancel);
48
SpinningWheel.setDoneAction(done);
53
function openOneSlot() {
54
SpinningWheel.addSlot({1: 'Ichi', 2: 'Ni', 3: 'San', 4: 'Shi', 5: 'Go'});
56
SpinningWheel.setCancelAction(cancel);
57
SpinningWheel.setDoneAction(done);
63
var results = SpinningWheel.getSelectedValues();
64
document.getElementById('result').innerHTML = 'values: ' + results.values.join(' ') + '<br />keys: ' + results.keys.join(', ');
68
document.getElementById('result').innerHTML = 'cancelled!';
72
window.addEventListener('load', function(){ setTimeout(function(){ window.scrollTo(0,0); }, 100); }, true);
77
<style type="text/css">
78
body { text-align:center; font-family:helvetica; }
79
button { font-size:16px; }
80
#result { margin:10px; background:#aaa; -webkit-border-radius:8px; padding:8px; font-size:18px; }
86
<p>Spinning Wheel slot machine alike widget for iPhone and iPod touch.
87
This demo works only on the simulator and the real devices, it does not work on any other browser.</p>
88
<button onclick="openBirthDate()">birth date</button>
89
<button onclick="openWeight()">weight</button>
90
<button onclick="openOneSlot()">1 slot</button>
91
<p id="result">results</p>
92
<p><a href="http://cubiq.org/spinning-wheel-on-webkit-for-iphone-ipod-touch/11">Read the related article on cubiq.org</a></p>
94
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
95
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
97
this text is here for the sole purpose of making the page longer
b'\\ No newline at end of file'