title: using a variable in GetElementByID
body: <p>I have a scenario where I am building a series of DIVS and each has an ID assigned in the syntax 'div1', 'div2', etc etc.... </p>
  
  <p>the divs all appear fine and I can see their ID's are all assigned properly... </p>
  
  <p>I am trying to use the following code to then allow a click (where the ID is passed) to toggle the display of the corresponding div:</p>
  
  <pre><code>$("#page-wrap li a").click(function(id){
   var thisid = ('#'+$(this).attr('id').toString());
   alert(thisid);
   document.getElementById(thisid).hide();
  }
  </code></pre>
  
  <p>but the error console shows that the getelementbyid has a null value.</p>
  
  <p>what am I missing?  I tried forcing the thisid var to a string but that didnt work either.</p>
  
  <p>thanks for any light anyone can shed on this for me.</p>