-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3. Loading Button.html
More file actions
55 lines (42 loc) · 1.31 KB
/
3. Loading Button.html
File metadata and controls
55 lines (42 loc) · 1.31 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="demo.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat|Oswald" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css">
<title>Online Influencer</title>
<style type="text/css">
button {
font-size: 35px;
cursor: pointer;
}
.hidden {
position: absolute;
top: -20px;
visibility: hidden;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="title">Online Influencer</div>
<button>Load Data</button>
<!-- preload -->
<i class="hidden fas fa-yin-yang fa-spin"></i>
</div>
<!-- wrapper -->
<script type="text/javascript">
var button = document.querySelector("button");
button.addEventListener("click",function(){
button.disabled = true;
button.innerHTML = "<i class=\"fas fa-yin-yang fa-spin\"></i> Loading Data ...";
setTimeout(function(){
button.disabled = false;
button.innerHTML = "Data Loaded";
alert("Data has been loaded.");
},2000);
});
</script>
</body>
</html>