Upload animation
This commit is contained in:
parent
46d306a7b9
commit
ce01f0ac19
|
@ -111,6 +111,16 @@ body {
|
|||
background-color: #33BB33;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {background-color: #117711;}
|
||||
50% {background-color: #44CC44;}
|
||||
100% {background-color: #117711;}
|
||||
}
|
||||
|
||||
.uploading {
|
||||
animation: pulse 3s infinite;
|
||||
}
|
||||
|
||||
.uploadButton p {
|
||||
padding: 20px;
|
||||
font-weight: 300;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
QuadFile
|
||||
</h1>
|
||||
<form action="" id="form" name="fileForm" method="post" enctype="multipart/form-data" class="uploadForm">
|
||||
<div class="uploadButton">
|
||||
<div id="uploadButton" class="uploadButton">
|
||||
<p id="uploadText">
|
||||
Click to select a file
|
||||
</p>
|
||||
|
@ -29,6 +29,8 @@
|
|||
<script>
|
||||
document.getElementById("file").onchange = function() {
|
||||
document.getElementById("uploadText").innerHTML = "Uploading...";
|
||||
var button = document.getElementById("uploadButton");
|
||||
button.className = button.className + " uploading";
|
||||
document.getElementById("form").submit();
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue