Guys i am having some problems with my NEW plugin (yes another one :p)

Is it possible to search backwards from the current element?

To be specific, i need to find the first VISIBLE (e.g. not hidden by css
or not type="hidden") and FOCUSABLE element before element i am basing my
search of.

A pseudo example:
-----------------
<input text>
<input hidden>
<input hidden>
<input hidden>
<checkbox> (hidden by css)
<label>

User is focused on the label, and presses SHIFT+TAB, normally it would set
the focus on the checkbox. But since i have coded a custom .focus()
function on that AND it is hidden, i need to set the focus to the text
input.

I came up with this, but that wouldn't work :0
jQuery('input:eq(-2)').is(':visible)[0];

Any tips if this is even possible?



_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to