_toggleStripes: function (index) { var task = this._toggleStripesTask, self; // index|0 to force int, avoid NaN. Math.max() to avoid neg indexes. index = Math.max((index|0), 0); if (!task) { self = this; this._toggleStripesTask = { timer: setTimeout(function () { var odd = [this.CLASS_ODD, this.CLASS_EVEN], even = [this.CLASS_EVEN, this.CLASS_ODD]; self.tbodyNode.get('childNodes') .slice(self._toggleStripeTask.index) .each(function (row, i) { row.replaceClass.apply(row, (index + i) % 2 ? odd : even); }); this._toggleStripesTask = null; }, 0), index: index } } else { task.index = Math.min(task.index, index); } }