javascript - Problem waiting til function has finished executing before it tries to execute again -


I am using $ (window) .scroll (); When a user is close to the top or bottom of the sloals, a second to execute the function to specify the function to call

takes another, and if they keep scrolling, Implemented several times before.

Is there any way to start the function from which I execute and then tell the $ (window) .scroll () function that it needs to wait before re-implementing that function? You can set a boolean that you are already checking the scroll position:

  checking = condition = false; $ Window.scroll (function () {if (checkingPosition) returns; checking = status; // do stuff; position = false;});  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -