-
Notifications
You must be signed in to change notification settings - Fork 216
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
Adding span around each number #29
Comments
Ahh, yeah, it was changed from the $('.timer').countTo({ renderWith: 'html' }); ...or via HTML data attributes: <span class="timer" data-render-with="html" data-from="0" data-to="100"></span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm trying to add a span around each number to be able to format each number differently.
formatter: function (value, options) { var value = value.toFixed(options.decimals); return value.replace (/(<.*?>)|(.)/g, function (m0, tag, ch) { return tag || ('<span>' + ch + '</span>'); }); }
I tried to use this formatter function, which works, but ouptuts the tag so they get displayed, instead as HTML. Is there a way to fix this?
The text was updated successfully, but these errors were encountered: