Jquery - Stop keydown scrolling from bubbling?

Var wait = false; function theEvent(){ if(wait){ return; } wait = true; do somthing //You need to make sure that this is in the callbacks, ie all events are complete. Wait = false; // or setTimeout(function(){wait = false}, xxx ) }.

I've tried doing this, (have a look at the URL I've given). But what seems to happen is that once you press right then left then it gets the wrong width. Do you know of any other methods that might work?

I've tried . Stop (but what it does is stop the animation half way through), . StopPropagation (this does nothing as far as I've tried) & trying to set a variable to true whilst running the function then setting it to false but I don't think I've done this properly.

– Nino Harris May 22 at 20:22 I know the pain, I had this same problem with an Iphone web app, on the swipe event, and the calculation would get all out of whack, exact same issue. I solved this by putting a small delay on when they can press the left and right , ie swipe. Stackoverflow.Com/questions/5380994/… – Bodman May 22 at 20:29 There has to be a better way tho haha, seems fairly common.

– Bodman May 22 at 20:40 I know, I've tried adding a delay but it still has the same problem with calculating it right. Is there a way that a function will only run when (say for instance) X = false, then while the function is running X = true so that the function can't be run again until it's finished where X would return to false? – Nino Harris May 22 at 20:45 Yeah, thats basically what the delay was doing.

The hard part is you want all your animation to complete, you could put the x = false inside the longest events callback. I wrote above what you mean.Im not sure if this will work tho, the issue is that bubbling may still occur. – Bodman May 22 at 20:54.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions