Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V5] throttle scroll handler for performance gain #8884

wants to merge 1 commit into from
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.


Just for now

@@ -16,7 +16,8 @@
is_hover : true,
scrolltop : true, // jump to top when sticky nav menu toggle is clicked
sticky_on : 'all',
dropdown_autoclose: true
dropdown_autoclose: true,
scroll_throttle: 300

init : function (section, method, options) {
@@ -430,9 +431,9 @@
sticky : function () {
var self = this;

this.S(window).on('scroll', function () {
this.S(window).on('scroll', self.throttle( function () {
}, self.settings.scroll_throttle));

update_sticky_positioning : function () {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.