So what I need is, e.g I have a button, when it gets clicked, I wish it also to trigger a tab key press, so the focus will move to next element with tabindex=0
I have something like this, but not working:
var btnSkipMenu = $("#btnSkipMenu");
btnSkipMenu.click(function() {
var tabEvent = jQuery.Event("keydown");
tabEvent.which = 9;
this.trigger(tabEvent); //so it should simulate key press tab, then focus move to next tabindex=0
});
please advise with some code sample Thanks