Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Your example code on npmjs.com is incorrect #22

Open
jessedmatlock opened this issue Apr 7, 2021 · 0 comments
Open

Your example code on npmjs.com is incorrect #22

jessedmatlock opened this issue Apr 7, 2021 · 0 comments
Labels

Comments

@jessedmatlock
Copy link

Hello,
First, thanks for the great work on this plugin! Well done.
I just wanted to point out a syntax error on a piece of demo code at npmjs.com so others won't copy/paste and then have an error..

The example code is:

$('.counter').counterUp({
    delay: 10,
    time: 1000,
    offset: 70,
    beginAt: 100,
    formatter: function (n) {
      return n.replace(/,/g, '.');
    });   <!-- this has an extra parenthesis and semi-colon
});

But, it should be:

    delay: 10,
    time: 1000,
    offset: 70,
    beginAt: 100,
    formatter: function (n) {
      return n.replace(/,/g, '.');
    }
});

Hope this helps someone starting out and trying out this great plugin.
Again, really great work and much appreciate !

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

No branches or pull requests

2 participants