Selector for next non-sibling input element?

Selector for next non-sibling input element?

Hi there

I'm working with jQuery on a form where each input element is contained in an <li> element. I'm a bit of a newb, and absolutely loving it, but I've hit a puzzle.

Some fields are read-only, identified by a class ".readonly", and I'd like to bind a jQuery function to these fields' "focus" event, to send the focus to the next input whose class is not read-only.

But, because of the containing <li> elements, I don't think .next('input') will work, since the <input> tags aren't siblings.

Is there a simple selector that will do the job without having to climb up and down the DOM via parents and children? To me that feels unsatisfactory and brittle, because should the designer decide to change the layout (lists within lists, <div>'s within <li>'s), my DOM-climbing code might break.

Thanks!