title: pass element ID as a parameter to jquery
body: <p>I have a select box on a web form that, depending on what is selected, will show a hidden div.</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function () {
  
      $("#Select1").change(function () {
          $(this).find("option:selected").each(function(){
              if($(this).attr("Value")=="2"){
  
                  $("#hiddentable11").show();
              }
              else if($(this).attr("Value")=="3"){
  
                  $("#hiddentable11").show();
              }
  
              else{
                  $("#hiddentable11").hide();
              }
          });
      }).change();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The form will have 35 to 40 of these Select box/hidden div combinations.  The option values in the select boxes will all be the same every time (0,1,2,3,4).  If the user chooses option 2 or 3 for Select1, hiddentable11 appears.  If they choose option 2 or 3 for Select2, hiddentable 12 appears  I don't want to copy/paste this code 40 times and in the code change Select1/hiddentable11 to Select2/hiddentable12, Select3/hiddentable13 etc.  How do I change this code so that I can reuse it for all of the select/div combinations?</p>