[jQuery] Accordion menu focus in onopenclose:function ?
I have forms inside accordion menus and want to focus on the first
element (that has a tabindex) after the accordion opens.
Accordion has a function for this, "onopenclose". If I put $
("input[@tabindex]:first").focus(); in there, then when the first menu
opens the first input field gets focus. But that is not what I want. I
want a child the next sibling <ul> after the <h3> that has class
"openheader" to get the focus. So I try this...
$("h3.openheader + ul input[@tabindex]:first").focus();
and nothing gets focus. :-(
Since I have the collapseprev feature set to true, only one <h3>
element should have the openheader class. Even if I get very specific
and use $("h3.openheader + ul li div form
input[@tabindex]:first").focus(); I still get nothing. Is the use of a
class designator not specific enough when trying to get at a next
sibling?