Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yakubu234/e08ecd78905a17c0915fe8283f9fa44e to your computer and use it in GitHub Desktop.
Save yakubu234/e08ecd78905a17c0915fe8283f9fa44e to your computer and use it in GitHub Desktop.
<script>
// load your jquery.min.js
$('#submit_button').on('click',function(e){
e.preventDefault();
//Add a code to show your loader.
$('form').submit();
});
<!-- progress bar -->
var timeleft = 10;
var downloadTimer = setInterval(function(){
if(timeleft <= 0){
clearInterval(downloadTimer);
}
document.getElementById("progressBar").value = 10 - timeleft;
timeleft -= 1;
}, 1000);
</script>
<progress value="0" max="10" id="progressBar"></progress>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment