Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • This is almost perfect for my project, but I needed it not to tab to every single radio button. A loop to skip inputs with the same name did the trick. var nextInput = $('input,select,textarea')[$('input,select,textarea').index(this)+1]; while ($(this).attr('name') === $(nextInput).attr('name')) { nextInput = $('input,select,textarea')[$('input,select,textarea').index(nextInput)+1]; } It still gets stuck inside hidden inputs. Usually they could be at the top of the form, but I have a conditionally hidden input that has to reappear in the right place. Commented Jul 10, 2015 at 4:49
  • 1
    if (keyCode === 13) { is better Commented Sep 10, 2015 at 6:39