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

Uncaught TypeError: Cannot read property 'replace' of undefined #63

Open
ifourvimal opened this issue May 15, 2018 · 1 comment
Open

Comments

@ifourvimal
Copy link

While integrating counter up with my project I am getting this error on console

Uncaught TypeError: Cannot read property 'replace' of undefined
    at Waypoint.a [as callback] (jquery.counterup.min.js:9)
    at Waypoint.trigger (jquery.waypoints.min.js:59)
    at Group.flushTriggers (jquery.waypoints.min.js:531)
    at jquery.waypoints.min.js:438

Here is my html

<div class="value white">
	<p class="sbold addr-font-h1" ><span class="counter"> 1000 </span></p>
	<p>NEW Records</p>
</div>

here is jquery

<script type="text/javascript">
	$(document).ready(function() {
		$('.counter').counterUp();
	});
</script>

I ahve included script like below,

<!-- Counterup  -->
<script src="assets/vendor/counterup/jquery.waypoints.min.js"></script>
<script src="assets/vendor/counterup/jquery.counterup.min.js"></script>
@dgumbo
Copy link

dgumbo commented Aug 16, 2018

hello
i was getting the same error for a while, that was before i decided to use the min version and it started working.

For me 'jquery.counterup.js' does not work but 'jquery.counterup.min.js' works

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

2 participants