forked from loktar00/JQuery-Snowfall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (72 loc) · 2.65 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src='snowfall.jquery.js'></script>
<link rel="stylesheet" href="styles.css"></link>
</head>
<body class="darkBg">
<input type="button" id="clear" value="Click to clear"/>
<input type="button" id="round" value="Rounded"/>
<input type="button" id="shadows" value="Shadows"/>
<input type="button" id="roundshadows" value="Rounded Shadows"/>
<input type="button" id="imgbut" value="Images"/>
<input type="button" id="collection" value="Snow Collection"/>
<input type="button" id="deviceorientation" value="Deviceorientation"/>
<div class="collectonme">
<p>Collect on meeeeee!!!</p>
</div>
<div class="collectonme">
<p>Collect on meeeeee!!!</p>
</div>
<div class="collectonme">
<p>Collect on meeeeee!!!</p>
</div>
</body>
<script type='text/javascript'>
$(document).ready(function(){
$('.collectonme').hide();
//Start the snow default options you can also make it snow in certain elements, etc.
$(document).snowfall();
$("#clear").click(function(){
$(document).snowfall('clear'); // How you clear
});
$("#round").click(function(){
document.body.className = "darkBg";
$('.collectonme').hide();
$(document).snowfall('clear');
$(document).snowfall({round : true, minSize: 5, maxSize:8}); // add rounded
});
$("#shadows").click(function(){
document.body.className = "lightBg";
$('.collectonme').hide();
$(document).snowfall('clear');
$(document).snowfall({shadow : true, flakeCount:200}); // add shadows
});
$("#roundshadows").click(function(){
document.body.className = "lightBg";
$('.collectonme').hide();
$(document).snowfall('clear');
$(document).snowfall({shadow : true, round : true, minSize: 5, maxSize:8}); // add shadows
});
$("#collection").click(function(){
$(document).snowfall('clear');
document.body.className = "darkBg";
$('.collectonme').show();
$(document).snowfall({collection : '.collectonme', flakeCount : 250});
});
$("#imgbut").click(function(){
$('.collectonme').hide();
$(document).snowfall('clear');
document.body.className = "darkBg";
$(document).snowfall({image :"images/flake.png", minSize: 10, maxSize:32});
});
$("#deviceorientation").click(function(){
$(document).snowfall('clear');
$('.collectonme').hide();
document.body.className = "darkBg";
$(document).snowfall({deviceorientation : true, round : true, minSize: 5, maxSize:8});
});
});
</script>
</html>