|
1234567891011121314151617181920212223242526272829 |
- $(function () {
- var loadHtmlArr = [
- // "cover",
- // "preface",
- // "section_1",
- "section_2",
- // "section_3",
- // "section_4",
- ];
- $(".pdf_root").html(loadHtmlArr.map(function (htmlName) {
- return "<div class='" + htmlName + "_html_root'></div>";
- }).join(""));
- loadHtmlArr.forEach(function(htmlName) {
- if (htmlName === "preface") {
- $("." + htmlName + "_html_root").data("page-params", JSON.stringify({
- htmlName: htmlName,
- subjectname: "语文",
- num: 12
- }));
- } else if (htmlName === "section_1") {
- $("." + htmlName + "_html_root").data("page-params", JSON.stringify({
- htmlName: htmlName,
- subjectname: "数学",
- num: 33
- }));
- }
- $("." + htmlName + "_html_root").load("../sections/" + htmlName + ".html");
- });
- });
|