title: can we use a .each within a .each in jquery?
body: <pre><code>$("[name=form_1]").each(function(){
      alert("i in else"+i);
      $('.eform_text').each(function() {
      });
  });
  </code></pre>
  
  <p>would this loop iterate over all elements that have a class of eform_text only in form1 .Or would it iterate over all elements which have that class ?</p>
  
  <h3>Update:</h3>
  
  <p>The exact jsp code is as follows:</p>
  
  <p><code>&lt;c:when test="${eformDetails.controlType==1}"&gt;
  &lt;input  id="textBox_${eformDetails.id}_${eformDetails.required}_${i}" class="eformDetail eform_text" type="text" value="" name="form_${i}" onblur="validateEformInputs(${i-1})"&gt;&lt;/input&gt;
                         &lt;/c:when&gt;</code></p>
  
  <p>i have the form which varies each time.and for each form i need to obtain all the text boxes.Currently after your help my javascript is ass follows:</p>
  
  <p>$("[name=form_"+i+"]").each(function(i){
              alert("i in else"+i);</p>
  
  <pre><code>         $('.eform_text', this).each(function() {
          textboxId = $(this).attr("id");
  </code></pre>
  
  <p>It reaches the first alert but i am not able to reach the second loop.It is not obtaining elements that have class eform_text.Not sure what is going wrong here.Could you please help?</p>