Closed Twe3tone closed 3 years ago
Multiple counters can use the same function. It's up to you how you differentiate between different counters in that function. Or you can set up multiple functions by giving them different names. Here handleInit
links the HTML to the function.
<div class="tick"
data-did-init="handleInit"
data-value="1000">
<span data-view="text"></span>
</div>
<script>
function handleInit(tick) {
// The `tick` parameter contains a reference
// to the tick element that called this method
// this makes it easier to use a single function
// for multiple tick elements.
}
</script>
I did the solution with different function names, it works perfectly, thank you. And very good plugin, thanks a lot !
Oh another question sorry, how can I add space for thousand, million etc... between numbers ? I tried ".toLocaleString() ;" but not working (I have to use millions number and it's not really readable actually). I want something like this with space and splited individual numbers : 1 176 234 109 981 976 ...
Thx in advance !
you probably have to use css margins for that
Hi ! I need to create 5 value counters with differents values and intervals on a same page. I can't find on flip documentation how to do it. Is it possible to add data on html and use only one function ? I'm trying to work with this one :
Thanks in advance