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 719 forks source link

Fixed waypoint issue when scrolling back number doesn't count till the end #77

Open flashblue opened 3 years ago

flashblue commented 3 years ago

I added the following code to store counter data. Because, after scrolling the page, the counter wasn't count till the stored number.

if ($this.data("text")==undefined) { $this.data("text", $this.text()); } else { $this.text($this.data("text")); }

var num = $this.text();