views:

181

answers:

1

instead of checking only the immediate children of an element, i would like to recursively check all children of the element.

specifically, something like

$("#survey11Form>input[type=text]:visible").val();

with the html:

<form id="survey11Form" name="survey11Form" action="#" method="post">
            <div id="survey11Div">

                <fieldset>
                    <legend>TEST'TEST"TEST</legend>


                        <div class="label">
                            <label test="" title="TEST'TEST" for="answer15">
                            TEST'TEST"TEST                      </label></div>


                        <div class="fieldWrapper text required">
                            <div style="width: 146px;" class="cellValue">
                                <input type="text" title="TEST'TEST" value="" id="survey11answer15" name="survey11answer15">

should give me the value of that input. the jquery i've come up with does not. any ideas as to what would work in this situation (and all recursive situations)?

thanks!

+6  A: 

I think what you want is

$("#survey11Form input[type=text]:visible")
John Hartsock
sickkkkkkkkkkkk i'm an idiot
gsquare567