From 42f6ac2bce522aa93fad24f2659b7e99a6d5fa27 Mon Sep 17 00:00:00 2001 From: Stu Eggerton Date: Wed, 6 Sep 2023 09:37:22 +1000 Subject: [PATCH] scroll to top of results --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f1fb672..af22830 100644 --- a/index.js +++ b/index.js @@ -195,7 +195,10 @@ function setupSurveyFromJson(json) { console.log(JSON.stringify(sender.data, null, 3)); //after a delay, generate the chart - setTimeout(generateChart(), 2000); + setTimeout(function () {generateChart()}, 500); + + //after a delay, scroll to top + setTimeout(function () {window.scrollTo(0, 0);}, 1000); $("#btnReset").show(); $("#btnExport").show();