Open RosiersRobin opened 8 years ago
hi!
try %
instead %
Doesn't work either. Isn't there a possibility to change the HEX thing? Like s = /[0-9]+,[0-9]+/.test(i);
doesn't allow chars....
There must be a solution for this?
Im using the :after pseudo-selector and it works quite well.
<span class="counter" id="your-number">24.1</span>
#your-number:after { content: "%"; }
Hi all,
In my case I can't do the code shared below by brycekirk because I'm using multiple numbers like.
1,943 register 90% increase.
and the result would be 1,943% wouldn't it?
Well, I ended up using brycekirk suggestion after all. I just had to do some weird tweaks.
`
## RAUL - 11-16-2018 had to do some tweaks to make anything with a percent sign remove it first, then run the counter program then add the percent sign again.
#if($_EscapeTool.xml($fact.getChild("heading").value).contains("%"))
#set($per_val = $_EscapeTool.xml($fact.getChild("heading").value))
#set($rep_per_val = $per_val.replace("%", "") )
<p class="fact-row-stat counter" id="your-number" style="color: #ed9f13;">$rep_per_val</p>
<style>#your-number:after { content: "%"; }</style>
#else
<p class="fact-row-stat counter" style="color: #ed9f13;">$_EscapeTool.xml($fact.getChild("heading").value)</p>
#end
`
Why not simply put the % outside the .counter
span?
<span class="counter">1,953</span> register
<span class="counter">90</span>% increase
Hi,
I want to be able to have a percentage in the count like
25%
If I add percent now, I got NaN