Loading js/multipage.js +12 −6 Original line number Diff line number Diff line Loading @@ -89,9 +89,7 @@ $("ul.pagination").removeClass('hidden'); $("#multipage-previous").click(function () { $("html, body").animate({scrollTop: $("#content").offset().top}, "fast"); // Show the previous section, hide the current one. var previousItem = null; if ($(".chunker-section:visible").prev().length !== 0) { previousItem = $(".chunker-section:visible").prev(); Loading @@ -103,13 +101,13 @@ $(".chunker-section:visible").hide(); previousItem.show(); } scrollTop(); return false; }); $("#multipage-next").click(function () { $("html, body").animate({scrollTop: $("#content").offset().top}, "fast"); // Show the next section, hide the current one. var nextItem = null; if ($(".chunker-section:visible").next().length !== 0) { nextItem = $(".chunker-section:visible").next(); Loading @@ -121,10 +119,18 @@ nextItem = $(".chunker-section:first"); nextItem.show(); } scrollTop(); return false; }); } function scrollTop() { // Make the correct focus point in the HTML. logger('scrolling to top...'); $("html, body").animate({scrollTop: $(".chunker-section:visible").offset().top}, "fast"); } function logger(message) { const prefix = 'sector_multipage: '; const debug = false; Loading Loading
js/multipage.js +12 −6 Original line number Diff line number Diff line Loading @@ -89,9 +89,7 @@ $("ul.pagination").removeClass('hidden'); $("#multipage-previous").click(function () { $("html, body").animate({scrollTop: $("#content").offset().top}, "fast"); // Show the previous section, hide the current one. var previousItem = null; if ($(".chunker-section:visible").prev().length !== 0) { previousItem = $(".chunker-section:visible").prev(); Loading @@ -103,13 +101,13 @@ $(".chunker-section:visible").hide(); previousItem.show(); } scrollTop(); return false; }); $("#multipage-next").click(function () { $("html, body").animate({scrollTop: $("#content").offset().top}, "fast"); // Show the next section, hide the current one. var nextItem = null; if ($(".chunker-section:visible").next().length !== 0) { nextItem = $(".chunker-section:visible").next(); Loading @@ -121,10 +119,18 @@ nextItem = $(".chunker-section:first"); nextItem.show(); } scrollTop(); return false; }); } function scrollTop() { // Make the correct focus point in the HTML. logger('scrolling to top...'); $("html, body").animate({scrollTop: $(".chunker-section:visible").offset().top}, "fast"); } function logger(message) { const prefix = 'sector_multipage: '; const debug = false; Loading