bfintal / Counter-Up

Counter-Up is a lightweight jQuery plugin that counts up to a targeted number when the number becomes visible.
http://bfintal.github.io/Counter-Up/demo/demo.html
GNU General Public License v2.0
746 stars 722 forks source link

Unable to use span tags elsewhere #39

Open ghost opened 7 years ago

ghost commented 7 years ago

When using the plug in, all other uses of the span tag break. For example I had a bit of code that was simply... <span class="author">Someones Name</span>

This then when the page renders just displays "NaN".

ciromattia commented 7 years ago

You have to call the initialization function with the right selector (e.g. not $('span').counterUp() but $('.counter').counterUp()) Also, you should use my fork in which I merged a bunch of PRs and updated for the latest waypoint version - it's already on bower and NPM.