From 672e6898b72a1006624fc92ce1aa1d57ef7aa730 Mon Sep 17 00:00:00 2001 From: Philip Mannheimer Date: Tue, 17 Jun 2014 16:20:31 +0200 Subject: [PATCH] Update jquery.counterup.js Added a callback which fires when the countup is done. --- jquery.counterup.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jquery.counterup.js b/jquery.counterup.js index bc7871f..e499767 100644 --- a/jquery.counterup.js +++ b/jquery.counterup.js @@ -14,7 +14,8 @@ // Defaults var settings = $.extend({ 'time': 400, - 'delay': 10 + 'delay': 10, + callback: function() {} }, options); return this.each(function(){ @@ -66,6 +67,7 @@ delete $this.data('counterup-nums'); $this.data('counterup-nums', null); $this.data('counterup-func', null); + $settings.callback.call(this); } }; $this.data('counterup-func', f); @@ -80,4 +82,4 @@ }; -})( jQuery ); \ No newline at end of file +})( jQuery );