Use native forEach instead of prototype's each
function filtersWidgetsByContent(text) {
var userInput = text.toLowerCase();
- widgetContents.each(function (widget) {
+ widgetContents.forEach(function (widget) {
var element = $j('#'+widget.id);
if (element != null) {
if (widget.c.indexOf(userInput) != -1) {
Treemap.prototype.load = function () {
var context = this.currentContext();
var output = '';
- this.breadcrumb.each(function (ctx) {
+ this.breadcrumb.forEach(function (ctx) {
output += ctx.label + ' / ';
});
$j('#tm-bc-' + this.id).html(output);
ps: PAGE_SIZE
},
success: function() {
- selected.each(function(item) {
+ selected.forEach(function(item) {
that.options.filterView.choices.unshift(item);
});
_.each(that.model.get('choices'), function(v, k) {