Focus trap for multiple modals

I’m working on a trap focus modal functionality and it works well with a single element, but I can’t get it working with multiple elements. It traps focus only on last modal. I know there is something …

jQuery: trigger event on tab key

I would like to call a function when the tab key is pressed within any field with the name=”notes”. I tried the following but this doesn’t fire (using IE 9). What do I have to change here to make this work at least in IE 8 and IE 9 ? Answer The problem I think is in the type of event you’re trying to listen to. The keypress event is triggered when a char gets written into an input text, while tab key doesn’t insert any character. It just blurs the input. Read more here. You might be looking for

How to detect if multiple keys are pressed at once using JavaScript?

I’m trying to develop a JavaScript game engine and I’ve came across this problem: When I press SPACE the character jumps. When I press → the character moves right. The problem is that …