How to change onfocus attribute with jquery according to tabindex?

I have a list of elements on my page that are ordered using tabindex. I'm looking for how I can emulate that the tab key has been pressed so that focus moves through the next item? I plan to focus on my elements in a specific time interval, i.e. 1 sec using jquery.

+3
source share
2 answers

Try the following:

$('a[href="#your_tab"]').trigger('click')

Edit: I see that you are trying to simulate TABkeypress not clickmouseclick. This will help you, I think: Modeling keystrokes using JavaScript

+1
source

Ropstah, keypress http://api.jquery.com/trigger/. , "

+1

All Articles