-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripty.html
99 lines (79 loc) · 1.8 KB
/
scripty.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE HTML!>
<html>
<head>
<!--object literal
<--dot notation-->
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
</head>
<body>
<style>
body {
margin: 0;
padding: 24px;
font:normal 12px/14px Arial;
background: red;
}
#slot-window {
text-align: center;
height: 13px;
position: relative;
overflow: hidden;
}
#slot-wheel span {
cursor: pointer;
background:white;
border-style: outset;
border-width: 3px;
border-color: black;
margin:6px;
}
#slot-wheel {
padding:0px;
position: relative;
top: 0px;
}
</style>
<script>
//{} = blocks and object literals
//() = functions, calling, notations, argument lists
//; = ??? end of a line of code (unnecessary? superfluous!!!!)
$(document).ready(function()
{
$('#slot-wheel').mouseenter(function()
{
var offset = Math.round(Math.random() * 7) * 14;
var cssboom = {"top": "-" + offset + "px"};
if( ! window.animation_enter)
{
window.animation_enter = true;
$('#slot-wheel').animate(cssboom, 1200,"swing", function(){
window.animation_enter = false;
});
};
});
if( ! window.animation_exit)
{
$('#slot-wheel').mouseleave(function ()
{
window.animation_exit = true;
var reset = {"top": "0" + "px"};
$('#slot-wheel').animate(reset, 1200, "swing", function(){ window.animation_exit = false;
});
})
};
});
</script>
<div id="slot-window">
<div id="slot-wheel">
<div><span>I'm Feeling Doodley</span></div>
<div><span>I'm Feeling Artistic</span></div>
<div><span>I'm Feeling Hungry</span></div>
<div><span>I'm Feeling Puzzled</span></div>
<div><span>I'm Feeling Trendy</span></div>
<div><span>I'm Feeling Stellar</span></div>
<div><span>I'm Feeling Playful</span></div>
<div><span>I'm Feeling Wonderful</span></div>
</div>
</div>
</body>
</html>