Skip to content
This repository has been archived by the owner on Aug 22, 2021. It is now read-only.

Scrolling away from counter then back again gives incorrect final value #28

Open
russelcole opened this issue Feb 8, 2016 · 6 comments

Comments

@russelcole
Copy link

I came across a problem with scrolling away from the counter whilst it was still in progress and then scrolling back again

If the original value is 100 and I scrolled away at 50, when I scrolled back it would count from 0 to 50 not 100

I fixed this by:
var $settings = settings;
var $originalText = $this.text(); // added this line

Changed:
var num = $this.text();
to
var num = $originalText;

@artreaktor-niks
Copy link

In Chrome I had numbers 0 ... 0 ... 0

Your fix helped. Thanks !

@rginnow
Copy link

rginnow commented Feb 15, 2016

Fixed for me too! You should make a pull request or fork. This project doesn't seem to kept up with.

onepartscissors added a commit to onepartscissors/Counter-Up that referenced this issue Feb 25, 2016
@onepartscissors
Copy link

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

@ciromattia
Copy link

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
Copy link

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.

@k4dm3l
Copy link

k4dm3l commented Jun 5, 2019

Thanks, this fork works for me :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants