forked from loktar00/JQuery-Snowfall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
indexpure.html
59 lines (51 loc) · 2.01 KB
/
indexpure.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
<html>
<head>
<script src='snowfall.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="imagebut" value="Images"/>
<div id="collect" class="collectonme">
<p>Collect on meeeeee!!!</p>
</div>
<div class="collectonme">
<p>Collect on meeeeee!!!</p>
</div>
<script type='text/javascript'>
var collectOnMe = document.querySelectorAll('.collectonme'),
buttons = document.getElementsByTagName("input");
for(var i = 0; i < collectOnMe.length; i++){
collectOnMe[i].style.display = "none";
}
//default options
snowFall.snow(document.body);
document.getElementById("clear").addEventListener("click", function(){
snowFall.snow(document.body, "clear");
});
document.getElementById("round").addEventListener("click", function(){
document.body.className = "darkBg";
snowFall.snow(document.body, "clear");
snowFall.snow(document.body, {round : true, minSize: 5, maxSize:8});
});
document.getElementById("shadows").addEventListener("click", function(){
document.body.className = "lightBg";
snowFall.snow(document.body, "clear");
snowFall.snow(document.body, {shadow : true, flakeCount:200});
});
document.getElementById("roundshadows").addEventListener("click", function(){
document.body.className = "lightBg";
snowFall.snow(document.body, "clear");
snowFall.snow(document.body, {round : true, shadow : true, minSize: 5, maxSize:8});
});
document.getElementById("imagebut").addEventListener("click", function(){
document.body.className = "darkBg";
snowFall.snow(document.body, "clear");
snowFall.snow(document.body, {image : "images/flake.png", minSize: 10, maxSize:32});
});
</script>
</body>
</html>