Skip to content

Commit 51a8c7e

Browse files
committed
Property access being faster than push() is an old story. let's stop
1 parent 002a548 commit 51a8c7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery.scrollbeacon.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
};
194194

195195
Scroller.prototype.add = function (elm, opts) {
196-
this.targets[this.targets.length] = new MovingTarget(this, elm, opts.offset);
196+
this.targets.push( new MovingTarget(this, elm, opts.offset) );
197197
bindMovingTargetEvents(elm, opts);
198198
return this;
199199
};

0 commit comments

Comments
 (0)