diff --git a/public/dom.js b/public/dom.js index 90ba59b..47b60d2 100644 --- a/public/dom.js +++ b/public/dom.js @@ -5,8 +5,8 @@ const test = ['No pain', '', '', '', '4 means I take some pain medication', '', scales.forEach((scale) => { scale.addEventListener('change', function () { - var currentScaleId = `${this.id}`; - var commentBoxId = `result${currentScaleId.slice(currentScaleId.indexOf('-'))}`; + var currentScaleId = `${this.id}`; //e.g. gives scale-fatigue + var commentBoxId = `comment${currentScaleId.slice(currentScaleId.indexOf('-'))}`; var scaleNumberId = `${this.id}-number`; var scaleNumber = document.querySelector(`#${scaleNumberId}`); var commentBox = document.querySelector(`#${commentBoxId}`); diff --git a/src/views/addData.hbs b/src/views/addData.hbs index be532a2..1bcfea2 100644 --- a/src/views/addData.hbs +++ b/src/views/addData.hbs @@ -12,7 +12,7 @@
-

Any comments you've saved will appear here as you move the scale

+

Any comments you've saved will appear here as you move the scale

{{/each}}