New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the value changed after few iterations? #23

Open
aldrienht opened this Issue Dec 22, 2015 · 4 comments

Comments

Projects
None yet
5 participants
@aldrienht

aldrienht commented Dec 22, 2015

I have this jquery code for re-animating counts every 3 seconds :
$(document).ready(function(){
var countUpLoop = setInterval(countUpNumbers, 3000);
countUpNumbers();

  function countUpNumbers(){        
    $('h1.title').counterUp({
      delay: 100,
      time: 1000
    });
  };

});

HTML:
<h1 class="title" data-bind="title">300</h1>

*After few interations, the counterUp change the original value of 300 to 0.

Change to:
<h1 class="title" data-bind="title">0</h1>

I don't know why, please help to figure it out. Thank you.

@onepartscissors

This comment has been minimized.

Show comment
Hide comment
@onepartscissors

onepartscissors Feb 25, 2016

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 commented Feb 25, 2016

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

@digsite

This comment has been minimized.

Show comment
Hide comment
@digsite

digsite Mar 1, 2016

If you'd like to use this with Waypoints 3.0+ check out my PR, which also solves this issue.
#13

digsite commented Mar 1, 2016

If you'd like to use this with Waypoints 3.0+ check out my PR, which also solves this issue.
#13

@ciromattia

This comment has been minimized.

Show comment
Hide comment
@ciromattia

ciromattia Mar 24, 2016

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 (thanks to @digsite PR), please check it out and tell me if it works.
Thanks!

ciromattia commented Mar 24, 2016

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 (thanks to @digsite PR), please check it out and tell me if it works.
Thanks!

@dnunes

This comment has been minimized.

Show comment
Hide comment
@dnunes

dnunes Mar 1, 2018

You can look up a simple solution on the CounterUp side (rather than changing WayPoint integration) on my reply at #57 (comment). It is a needed fix anyway, even if you use the correct new WayPoint methods.

dnunes commented Mar 1, 2018

You can look up a simple solution on the CounterUp side (rather than changing WayPoint integration) on my reply at #57 (comment). It is a needed fix anyway, even if you use the correct new WayPoint methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment