- Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathexample.html
More file actions
Latest commit
52 lines (45 loc) · 2.52 KB
/
Copy pathexample.html
File metadata and controls
52 lines (45 loc) · 2.52 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
<!doctype html>
<html>
<head>
<metacharset="utf-8">
<metahttp-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<metaname="description" content="">
<metaname="viewport" content="width=device-width, initial-scale=1">
<linkrel="stylesheet" href="css/jquery.loadingModal.css">
<style>
#wrapper {
text-align: center;
padding:30px;
}
</style>
</head>
<body>
<divid="wrapper">
<buttononclick="showModal();">Show loading modal</button>
</div>
<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<scriptsrc="js/jquery.loadingModal.js"></script>
<script>
functionshowModal(){
$('body').loadingModal({text: 'Showing loader animations...'});
vardelay=function(ms){returnnewPromise(function(r){setTimeout(r,ms);})};
vartime=2000;
delay(time)
.then(function(){$('body').loadingModal('animation','rotatingPlane').loadingModal('backgroundColor','red');returndelay(time);})
.then(function(){$('body').loadingModal('animation','wave');returndelay(time);})
.then(function(){$('body').loadingModal('animation','wanderingCubes').loadingModal('backgroundColor','green');returndelay(time);})
.then(function(){$('body').loadingModal('animation','spinner');returndelay(time);})
.then(function(){$('body').loadingModal('animation','chasingDots').loadingModal('backgroundColor','blue');returndelay(time);})
.then(function(){$('body').loadingModal('animation','threeBounce');returndelay(time);})
.then(function(){$('body').loadingModal('animation','circle').loadingModal('backgroundColor','black');returndelay(time);})
.then(function(){$('body').loadingModal('animation','cubeGrid');returndelay(time);})
.then(function(){$('body').loadingModal('animation','fadingCircle').loadingModal('backgroundColor','gray');returndelay(time);})
.then(function(){$('body').loadingModal('animation','foldingCube');returndelay(time);})
.then(function(){$('body').loadingModal('color','black').loadingModal('text','Done :-)').loadingModal('backgroundColor','yellow');returndelay(time);})
.then(function(){$('body').loadingModal('hide');returndelay(time);})
.then(function(){$('body').loadingModal('destroy');});
}
</script>
</body>
</html>