1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

fix js: hide page in the beginning

This commit is contained in:
Lu Wang 2012-09-13 00:49:02 +08:00
parent edda8f17ba
commit 3bc62dfe9d
3 changed files with 13 additions and 2 deletions

12
share/hide_pages.js Normal file
View File

@ -0,0 +1,12 @@
/* hide all pages */
(function(){
var s = '.p{display:none;}';
var n = document.createElement("style");
n.type = "text/css";
if (n.styleSheet) {
n.styleSheet.cssText = s;
} else {
n.appendChild(document.createTextNode(s));
}
document.getElementsByTagName("head")[0].appendChild(n);
})();

View File

@ -24,6 +24,7 @@
@base.css
$css
@jquery.js
@hide_pages.js
"""
<title></title>

View File

@ -4,8 +4,6 @@ $(function() {
$main = $("#pdf-main"),
l = $pages.length;
$pages.hide();
function isPageVisible(i, H) {
var $pw = $($pageWrappers[i]),
t = $pw.offset().top,