-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
64 lines (53 loc) · 1.36 KB
/
index.html
File metadata and controls
64 lines (53 loc) · 1.36 KB
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Loader</title>
<script src="jquery.min.js"></script>
<script src="vivus.min.js"></script>
<script src="sveegee.js"></script>
<style>
#loader {position:absolute; width: 60px; height: 60px; top: 50%; left: 50%; margin-left: -30px; margin-top: -30px; text-align:center; display: none;}
#loader svg {stroke: #3b8eff;}
</style>
</head>
<body>
<button class="showLoader">Show Loader</button>
<button class="hideLoader">Hide Loader</button>
<script>
$(function(){
// create an array of resources that we are going to use
var loader;
var resources = [
"resources/0.svg",
"resources/1.svg",
"resources/2.svg?i",
"resources/3.svg",
"resources/4.svg",
"resources/5.svg",
"resources/6.svg",
"resources/7.svg",
"resources/8.svg",
"resources/9.svg",
];
// configure the plugin
var params = {
resources : resources,
speed : 50,
displayTime : 500,
fadeTime : 250,
shuffleArray : true,
}
// assign to element
$('.showLoader').click(function(){
$('body').append("<div id='loader'></div>");
loader = $("#loader").sveegee(params);
$("#loader").fadeIn();
});
$('.hideLoader').click(function(){
loader.stopSVG(500);
});
});
</script>
</body>
</html>