I'd like to integrate the JQuery.CounterUp.js module into my solution. I had this working when I was using webforms, but I am struggling with ASPNETZERO.
I have figured out that I should include a @section Scripts in my view page, and I do have some working code in there that uses AJAX to retrieve some data and populate this into the DOM. However, I do not seem to be able to get the CounterUp module working. I added the script src entries for the waypoint and counterup js files into my script section and I have a span class=counter in my DOM, but when I run the page I get:
Error: Unable to get property 'replace' of undefined or null reference
That error is coming from the counterup.js.
Help!?
1 Answer(s)
-
0
Hi,
This does not seems related to AspNet Zero. But I will try to help you.
Are you using SPA or MPA? Maybe this library depends on another. As I see it depends on waypoints (<a class="postlink" href="https://github.com/bfintal/Counter-Up#usage">https://github.com/bfintal/Counter-Up#usage</a>). Did you added it to your page. Be sure that scripts is added (check source code of the page in browser for example).