In this post I am going to show how to create Youtube like loading bar with Jquery.
Live Demo
Download Script
Need library CSS and Js files.Include the following CSS & JS file.
<link href='nprogress.css' rel='stylesheet' />
<script src='jquery-2.0.js'></script>
<script src='nprogress.js'></script>
Please share your comments and feedback.Thanks.Please subscribe my updates via email.
Need library CSS and Js files.Include the following CSS & JS file.
<link href='nprogress.css' rel='stylesheet' />
<script src='jquery-2.0.js'></script>
<script src='nprogress.js'></script>
Jquery Code
<script>
$('body').show(); //to show loading bar
NProgress.start(); //to start Nprogress bar
setTimeout(function() { NProgress.done(); $('.fade').removeClass('out'); }, 1000); //Set timelimit for loading bar
</script>
$('body').show(); //to show loading bar
NProgress.start(); //to start Nprogress bar
setTimeout(function() { NProgress.done(); $('.fade').removeClass('out'); }, 1000); //Set timelimit for loading bar
</script>
No comments:
Post a Comment