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

Repair count up not completed bug #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion jquery.counterup.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/*!
* jquery.counterup.js 1.0
* jquery.counterup.js 1.1
*
* Copyright 2013, Benjamin Intal http://gambit.ph @bfintal
* Released under the GPL v2 License
*
* Date: Nov 26, 2013
* Update Date: Mar 21, 2017
*/
(function( $ ){
"use strict";
Expand All @@ -24,6 +25,12 @@
var $settings = settings;

var counterUpper = function() {
//Record original value
if (typeof $this.attr('counterup-text') === 'undefined')
$this.attr('counterup-text', $this.text());

if ($this.attr('counterup-text') !== $this.text()) return; //Count up not completed

var nums = [];
var divisions = $settings.time / $settings.delay;
var num = $this.text();
Expand Down
5 changes: 3 additions & 2 deletions jquery.counterup.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.