I want to to have a number appear with a percentage sign but using this method data-to
it doesn’t show as a valid value. I always get the output “NaN” Instead of 100%. The reason why I’m using data-to
is due to reasons in relation to the appearance of the value.
Below represents my code. As you can see in the “screenshot 1” the code works. However, I want to add a “%” symbol after the 100.
<h6><strong class="counter-timer" data-from="0" data-to="9534"></strong></h6>
If I add a percentage sign after the 100 integer the value will appear as “NaN”. This is demonstrated in my code below and “screenshot 2”. However, I want to use the data-to
effect but add a “%” symbol to my integer value. How can I go about fixing this?
<h6><strong class="counter-timer" data-from="0" data-to="9000%"></strong></h6>
SCREENSHOT 1:
SCREENSHOT 2: