From 469c06c88e815005f4fc8644fcf68177e1db2c16 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 8 Feb 2021 12:36:31 +0000 Subject: [PATCH] add captions (new field image_titles) --- js/main.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index 9990670..dcaeaf9 100644 --- a/js/main.js +++ b/js/main.js @@ -586,10 +586,13 @@ function loadQuestion(n, section = 1, force_reload = false) { image = image[0]; // Do we want the middle image? } + let caption = "..."; + if (current_question.image_titles != undefined) { + caption = current_question.image_titles[id]; + } + thumbnails.append( - '
...
' + `
${caption}
` ); // const thumbnail = $(".figure .thumbnail").get(id);