Difference between revisions of "Template:HFLS H2Z Hangzhou//home/rodlin/Desktop/aquamade/src/sub/integrated/js"
Matt Gerrard (Talk | contribs) (Created page with ";$(function () { setTimeout(function () { $(".comsec-main .float-menu").sticky({ scrollContext: $(".main.cont-wrap"), context: $(".comsec-m...") |
Matt Gerrard (Talk | contribs) |
||
Line 11: | Line 11: | ||
$(".comsec-main .passage.shown").removeClass("shown"); | $(".comsec-main .passage.shown").removeClass("shown"); | ||
$(".comsec-main .passage.passage-" + name).addClass("shown"); | $(".comsec-main .passage.passage-" + name).addClass("shown"); | ||
+ | |||
+ | setTimeout(function () { | ||
+ | if (window.imgview) { | ||
+ | imgview.refresh(); | ||
+ | } | ||
+ | }, 100); | ||
} | } | ||
Revision as of 12:01, 31 October 2017
- $(function () {
setTimeout(function () { $(".comsec-main .float-menu").sticky({ scrollContext: $(".main.cont-wrap"), context: $(".comsec-main"), offset: 100 }); }, 1000); function showPassage(name) { $(".comsec-main .passage.shown").removeClass("shown"); $(".comsec-main .passage.passage-" + name).addClass("shown");
setTimeout(function () { if (window.imgview) { imgview.refresh(); } }, 100); } function setUniqueActive(dom) { $(dom).siblings(".active").removeClass("active"); $(dom).addClass("active"); } $(".comsec-main .passlink").each(function (i, dom) { dom = $(dom); dom.click(function () { var passage = dom.data("passage"); if (passage) showPassage(passage); setUniqueActive(dom); $(".comsec-main .passlink").each(function (i, dom) { dom = $(dom); if (dom.data("passage") == passage) { setUniqueActive(dom); } }); }); });
});;