Skip to content

Commit 5286858

Browse files
committed
Unbind scroll event when destroying instance
1 parent 1acfebf commit 5286858

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

jquery.stellar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@
499499
setBackgroundPosition(background.$element, background.startingValueLeft, background.startingValueTop);
500500
}
501501

502-
this.$scrollElement.unbind('resize.' + this.name);
502+
this.$scrollElement.unbind('resize.' + this.name).unbind('scroll.' + this.name);
503503
this._animationLoop = $.noop;
504504

505505
$(window).unbind('load.' + this.name).unbind('resize.' + this.name);
@@ -627,7 +627,7 @@
627627
};
628628

629629
this.$scrollElement.bind('scroll.' + this.name, requestTick);
630-
update();
630+
requestTick();
631631
},
632632
_startAnimationLoop: function() {
633633
var self = this;

0 commit comments

Comments
 (0)