title: toggle elements by ids with consecutive numbered IDs
body: <p>I am completely lost here.
  I am trying to have a visibility toggle for called multiple elements with consecutively numbered IDs. The Class is already used for another function. I want the script to run a loop to get all elements that have the set ID and consecutive number to toggle visibility.
  this is the code I have.</p>
  
  <pre><code>&lt;div&gt;
  &lt;input type="checkbox" name="tag" id="angels" onclick="toggle_visibility('angelT');" /&gt;
  &lt;label for="angels"&gt;&lt;span&gt;Hide Angels&lt;/span&gt;
  
  &lt;/label&gt;
  &lt;/div&gt;
  &lt;div id="angelT1" style="display:block"&gt;angel1&lt;/div&gt;
  &lt;div id="angelT2" style="display:block"&gt;angel2&lt;/div&gt;
  &lt;div id="angelT3" style="display:block"&gt;angel3&lt;/div&gt;
  &lt;div id="angelT4" style="display:block"&gt;angel4&lt;/div&gt;
  &lt;div id="angelT5" style="display:block"&gt;angel5&lt;/div&gt;
  &lt;div id="angelT6" style="display:block"&gt;angel6&lt;/div&gt;
  </code></pre>
  
  <p>And this is the script.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function toggle_visibility(id) {
      var e = document.getElementById(id);
      if (e.style.display == 'block') e.style.display = 'none';
      else e.style.display = 'block';
  }
  &lt;/script&gt;
  </code></pre>