diff --git a/lib/ComicBook.js b/lib/ComicBook.js index a58c3ef..6aa30f1 100755 --- a/lib/ComicBook.js +++ b/lib/ComicBook.js @@ -10,7 +10,7 @@ - check for html5 feature support where used: diveintohtml5.org/everything.html or www.modernizr.com - write bin scripts to minify & join all js - when applying enhancements reading position gets lost - - use a loading bar / percentage indicator instead of explictly showing which pages are loading + - loading bar - full browser test - IE9 / FF3.6+ / Chrome / Safari / Opera Nice 2 have: @@ -464,7 +464,8 @@ function ComicBook(id, srcs, opts) { page.onload = function () { pages[i] = this; loaded.push(i); - $("#cb-status").text("loaded page " + (i + 1) + " of " + no_pages); + + $("#cb-status").text("loading " + Math.floor((loaded.length / no_pages) * 100) + "%"); // TODO: put back in the page render code, page request code };