[Accordion Menu] How to focus on form in open item
In an accordion menu, the <h3> header is the text you click on to
unhide/toggle a section. The section is inside a <ul>.
The Accordion plug in has a section in the code name "onopenclose"
where you can put code to run when the toggle fires. I want to run
code that will cause focus to be given to the first input form field
inside of the <ul>. I only want to consider input fields that have a
tabindex attribute.
So, since the <h3> whose section is open has a class of "openheader",
I need to find its next sibling <ul> and then find the first child of
the <lu> that has the tabindex attribute.
Why does this not work?
$("h3.openheader + ul input[@tabindex]:first").focus();
And what would work? I have an inkling that I should be using a
different selection method.