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

Add setIntervall for scrolling #70

Open
derSteffen opened this issue Oct 20, 2021 · 0 comments
Open

Add setIntervall for scrolling #70

derSteffen opened this issue Oct 20, 2021 · 0 comments

Comments

@derSteffen
Copy link

derSteffen commented Oct 20, 2021

Hello,
a very nice script but in the development tool I get a notice that the scroll-function fired too much.

No I want to include a setIntervall for the scrolling, for example

var scrollnow;
			$(window).scroll(function(event){
				scrollnow = true;
			});
			
			setInterval(function() {
				if (scrollnow) {
					thefunction();
					scrollnow = false;
				}
			}, 250);

here

$(document).on('scroll.' + options.namespace, function (options, $that) {
                    return function (evt) {
                        var success = tryInit(options, $that);

                        if (success) {
                            $(this).unbind(evt);
                        }
                    };
                }(options, $that));

and here

                $(document).on('scroll.' + o.options.namespace, function (o) {
                    return function () {
                        o.onScroll(o);
                    };
                }(o));

But my try was not successfull.

Please, can somebody help me?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant