Skip to content

Commit

Permalink
Change name of comments id p tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jennah2121 committed May 13, 2018
1 parent 27da7b6 commit 5b61aca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions public/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down
2 changes: 1 addition & 1 deletion src/views/addData.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<br>
<input id="scale-{{this.symptom}}" type="range" min="0" max="10" value="0" steps="1">
<span id="scale-{{this.symptom}}-number"></span>
<p id="result-{{this.symptom}}">Any comments you've saved will appear here as you move the scale</p>
<p id="comment-{{this.symptom}}">Any comments you've saved will appear here as you move the scale</p>
</div>
{{/each}}
</ul>
Expand Down

0 comments on commit 5b61aca

Please sign in to comment.