Counter-Up icon indicating copy to clipboard operation
Counter-Up copied to clipboard

Initial number not always the final number displayed

Open joamoa opened this issue 10 years ago • 7 comments

Processing number: 1615 results in 1614 after countup.


Config is $('#track-points:visible').counterUp({ delay: 10, time: 1000 });


Quick fix is to ensure final number is in the array when it is declared. I.e:

        var num = $this.text();
        var nums = [num];

Alternatively, for loop should be adjusted to make sure the initial number is added.

joamoa avatar Feb 13 '15 20:02 joamoa

Hi, how can I implement your quick fix? I'm sorry I don't fully understand what you are suggesting. I'm having the same issue. 30 is stopping at 29...

dbrunsden avatar Feb 25 '15 09:02 dbrunsden

Figured it out thanks!

dbrunsden avatar Feb 25 '15 10:02 dbrunsden

Thanks for this, was having the exact same issue.

itsrye avatar May 05 '15 13:05 itsrye

Thanks! work for me

divan4ik avatar Jul 02 '15 08:07 divan4ik

Hi All, i needed this more reliable for a project, so i forked it and added a 'total' variable that it always relies on. If the total is missing, it will work as per the original, using the text supplied by "$this.text()".

Here it is:

https://github.com/onepartscissors/Counter-Up

onepartscissors avatar Feb 25 '16 11:02 onepartscissors

In my fork I merged a bunch of PRs - it's already on bower and NPM.

This issue should be fixed with Waypoints-4.0.0 support, please check it out and tell me if it works. Thanks!

ciromattia avatar Mar 24 '16 11:03 ciromattia

Worked for me, @ciromattia. Thanks for fixing this!

mcfarlandonline avatar Oct 11 '17 16:10 mcfarlandonline