title: C# ASP.NET How to retrieve the number or className of EditorFor via JavaScript
body: <p>so in my view I have this </p>
  
  <pre><code>                for (int i = 0; i &lt; Model.Count; i++)
                  {  
                     @Html.EditorFor(m =&gt; m[i].IsSingle)
                  }
  </code></pre>
  
  <p>And depends on the number of Model.Count it will generate the Checkbox, sometimes it is more than 10 and sometimes it is 7 based on the List given from the Controller. <p>
  What I needed to do next is to check that if the user ticked one of the IsSingle, then another div will be displays.</p>
  
  <pre><code>            $(document).ready(function () {
  
  
                  if (document.getElementById("Single").checked == true) {
                      $("#tdSingle").show();
                  }
                  else {
                      $("#tdSingle").hide();
  
                  }
  
                  });
              });
  </code></pre>
  
  <p>I need to tweak the above code so that It will display the #tdSingle, if any of the checkbox is ticked.
  Anyone know how to achieve that?</p>
  
  <p>This is the sample of the EditorFor code being generated</p>
  
  <pre><code>&lt;input class="check-box" id="z0__IsSingle" name="[0].IsSingle" type="checkbox" value="true"&gt;
  </code></pre>
  
  <p>Sorry if I am being unclear.</p>
  
  <p>Thanks a lot!</p>