jQuery: is there a way to make a recursive child selector?
Posted
by gsquare567
on Stack Overflow
See other posts from Stack Overflow
or by gsquare567
Published on 2010-06-09T16:00:44Z
Indexed on
2010/06/09
16:02 UTC
Read the original article
Hit count: 430
jQuery
|jquery-selectors
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!
© Stack Overflow or respective owner