Fix Uncaught TypeError: Cannot read property 'style' of null when NProgress start

This commit is contained in:
Christian Esperar 2015-11-18 18:14:11 +08:00
parent 06b2c0c3d5
commit 725fdf86fc
2 changed files with 14 additions and 4 deletions

View file

@ -25,9 +25,6 @@
<script src="js/jquery.min.js"></script>
<script src="js/nprogress.js"></script>
<script>
NProgress.start();
</script>
<!--[if lt IE 9]>
<script src="../assets/js/ie8-responsive-file-warning.js"></script>

View file

@ -303,6 +303,7 @@ $(function () {
});
/** ****** Accordion *********************** **/
/** ****** scrollview *********************** **/
$(document).ready(function () {
@ -312,4 +313,16 @@ $(document).ready(function () {
});
});
/** ****** /scrollview *********************** **/
/** ****** /scrollview *********************** **/
/** ****** NProgress *********************** **/
if (typeof NProgress != 'undefined') {
$(document).ready(function () {
NProgress.start();
});
$(window).load(function () {
NProgress.done();
});
}
/** ****** NProgress *********************** **/