title: Loop through html table using jquery
body: <p>How can we loop through a dynamically created table in MVC using jquery excluding the header row.</p>
  
  <p>requirement:- I have table with two columns "id" and " name" by clicking new i can add new rows and type data. when clicking submit i need to check all row contain data typed or not. If all are filled the form will submit else alert the user to fill the form.</p>
  
  <p>The problem i am facing is it is not reading the value typed on the texbox of table. I tried both .Text() and .val()</p>
  
  <p><strong>Edited with code</strong></p>
  
  <pre><code>      &lt;table id="Newservice" style="display:none"&gt;
          &lt;tr&gt;
   &lt;td&gt;&lt;input id="start-%" class="datepicker" style="width:75px" type="text" name="provider_service_dtls[#].activity_start_date" value /&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input id="type-%" style="width:100px" class="act_type" type="text" name="provider_service_dtls[#].activity_type" readonly value /&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input id="code-%" class="act_code" style="width:150px" type="text" name="provider_service_dtls[#].activity_code"  value /&gt;&lt;/td&gt;
   &lt;td&gt;&lt;input id="clinician-%" class="clini" style="width:150px" type="text" name="provider_service_dtls[#].clinician" value /&gt;&lt;/td&gt;
   &lt;td&gt;&lt;input id="net-%" class="" style="width:40px" type="text" name="provider_service_dtls[#].net_amt" value /&gt;&lt;/td&gt;
   &lt;td&gt;&lt;input id="qty-%" class="" style="width:25px" type="text" name="provider_service_dtls[#].quantity" value /&gt;
  &lt;input type="hidden" name="provider_service_dtls.Index" value="%" /&gt;
   &lt;/td&gt;
  &lt;td&gt;&lt;input id="delete" class="delete" value="X" type="button"&gt;&lt;/td&gt; &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>jquery adding code</strong></p>
  
  <pre><code> var index = (new Date()).getTime();
  var clone = $('#Newservice').clone();
  clone.html($(clone).html().replace(/\[#\]/g, '[' + index + ']'));
  clone.html($(clone).html().replace(/"%"/g, '"' + index + '"'));
  clone.html($(clone).html().replace(/"token-input-diag-%"/g, 'token-input-diag-' + index));
   clone.html($(clone).html().replace(/"token-input-desc-%"/g, 'token-input-desc-' + index));
  clone.html($(clone).html().replace(/"type-%"/g, 'type-' + index));
  clone.html($(clone).html().replace(/"code-%"/g, 'code-' + index));
                      clone.html($(clone).html().replace(/"start-%"/g, 'start-' + index));
  clone.html($(clone).html().replace(/"clinician-%"/g, 'clinician-' + index));
  clone.html($(clone).html().replace(/"net-%"/g, 'net-' + index));
  clone.html($(clone).html().replace(/"qty-%"/g, 'qty-' + index));
  var html = clone.html();
  $("#service").append(clone.html());
  </code></pre>
  
  <p><strong>Loop to read</strong></p>
  
  <pre><code>var table = $("service");
    table.find('tr').each(function (i, el) {
   var $tds = $(this).find('td');
  alert($tds.eq(1).text());
  alert($tds.eq(2).text());
  alert($tds.eq(3).text());
  alert($tds.eq(4).text());
  alert($tds.eq(5).text());
  }
  </code></pre>