Skip to content

Commit

Permalink
trying to force the progressbar to be done only when images are all l…
Browse files Browse the repository at this point in the history
…oaded
  • Loading branch information
marpontes committed Feb 28, 2015
1 parent c29fd3f commit 19bee73
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion js/PageController.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,17 @@ function PageController(){
_body.append(overlay);
$(".pg-overlay-close").unbind()
.click(_enableMainPage);

if ($("#main_content").find("img").length > 0) {
$("#main_content img").on('load', function() {
NProgress.done();
});
}else{
NProgress.done();
}

}).always(function(){
NProgress.done();

});


Expand Down

0 comments on commit 19bee73

Please sign in to comment.