Give help. Get help.
There seems to be a few glitches with some jquery I’m working with. I’ve attempted a fix…having no luck. Hopefully the experts here can provide some assistance. Thank you.
Multiple keydown events are fired if a user holds down the key for an extended period of time.
Changed keydown to keyup _Failed to solve issue and affected desired output_
Fire keydown event only once if the user holds down the key…preventing continuous scrolling
Something like this should work:
You’re allowed to use the up/down arrows once by setting a variable to true on keyup. Also, the e.preventDefault() prevents the browser window from scrolling up/down.
[Check this out](http://jsfiddle.net/VvU8d/embedded/result/). I combined both scripts. I think that should work for you.
I couldn’t simulate the issue you were having. But I have a hunch what was causing it. I updated the code, [try this](http://jsfiddle.net/6TCdY/embedded/result/). Does that fix it?
I actually just put the two scripts together, and had no issues. Haha.
You must be logged in to reply to this topic.