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
| <script>
function sakuraInit() {
$(document).snowfall('clear');
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone",
"SymbianOS", "Windows Phone",
"iPad", "iPod"];
var flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
if (flag) {
$(document).snowfall({image:"images/1.png", flakeCount:5, minSpeed:1, minSize:8, maxSize:15,});
$(document).snowfall({image:"images/2.png", flakeCount:5, minSpeed:1, minSize:8, maxSize:15,});
$(document).snowfall({image:"images/3.png", flakeCount:5, minSpeed:1, minSize:8, maxSize:15,});
$(document).snowfall({image:"images/4.png", flakeCount:5, minSpeed:1, minSize:8, maxSize:15,});
} else {
$(document).snowfall({image:"images/1.png", flakeCount:2, minSpeed:1, minSize:8, maxSize:15,});
$(document).snowfall({image:"images/2.png", flakeCount:2, minSpeed:1, minSize:8, maxSize:15,});
$(document).snowfall({image:"images/3.png", flakeCount:2, minSpeed:1, minSize:8, maxSize:15,});
$(document).snowfall({image:"images/4.png", flakeCount:2, minSpeed:1, minSize:8, maxSize:15,});
}
}
window.onload = sakuraInit();
</script>
|