-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdemo.html
33 lines (29 loc) · 799 Bytes
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="jquery-ui.min.js"></script>
<script type="text/javascript" src="src/rouletteWheel.js"></script>
<script type="text/javascript">
$(function(){
var itemsToShow = parseInt(4 + Math.random()*10);
console.log(itemsToShow);
var items = {};
for(var i=0; i < itemsToShow; i++){
items[i] = 'ITEM ' + (i+1);
}
$('#canvas').rouletteWheel({
items : items,
selected : function(key, value){
alert('SELECTED : ' + key + ' => ' + value);
},
spinText : 'Click Me',
});
});
</script>
<title></title>
</head>
<body>
<canvas id="canvas" width="500" height="500"></canvas>
</body>
</html>