From b05c85a8641c90df8461cc9533a83f5f28f1f3aa Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 6 Dec 2016 11:44:21 +0800 Subject: [PATCH] ux/FlipCounter.js --- ux/FlipCounter.js | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/ux/FlipCounter.js b/ux/FlipCounter.js index fc280d562e..e902e118a1 100644 --- a/ux/FlipCounter.js +++ b/ux/FlipCounter.js @@ -32,31 +32,14 @@ Roo.extend(Roo.ux.FlipCounter, Roo.bootstrap.Component, { speed : 0.2, - - -;(function ( $, window, document, undefined ) { - - // Create the defaults once - var pluginName = 'flipCounter', - defaults = { - speed: 0.2, - onFlip: function() {}, - onResize: function() {} - }; - - // Constructor - function FlipCounter( element, options ) { - this.el = $(element); - this.options = $.extend({}, defaults, options); - this._defaults = defaults; - this._name = pluginName; - this.init(); - } - - FlipCounter.prototype.init = function () { + + init : function () + { var elem = this.el; - var startNum = elem.html(); - if (startNum === "") startNum = "0"; + var startNum = elem.dom.innerHTML(); + if (startNum === "") { + startNum = "0"; + } elem.html(''); this.ul = elem.children('ul'); -- 2.39.2