$(document).ready(() => { $(window).on("resize", () => f.render()); $(window).bind('mousewheel DOMMouseScroll MozMousePixelScroll', event => { f.page = (event.originalEvent.wheelDelta / 120 > 0)?-1:1; }); $("div#up").on("click", () => { f.page = -1; }); $("div#down").on("click", () => { f.page = 1; }); });