title: Ridiculously simple jQuery reusable function question
body: <p>Really quick jQuery question...</p>
  
  <p>I have this function: </p>
  
  <pre><code>$(document).ready(function() {
  
    $('a#show1').click(function() {
      $('.item1').toggle(1000);
      return false;
    });
  
    $('a#show2').click(function() {
      $('.item2').toggle(1000);
      return false;
    });
  
    // And it goes on...
  });
  </code></pre>
  
  <p>The page the script runs on has any number of <code>show</code> and <code>item</code> divs, all unique and identified as <code>itemX</code></p>
  
  <p>How can I rewrite the repeated and identical functions for <code>show1</code> and <code>show2</code> so that it ends up essentially like this:</p>
  
  <pre><code>$('a#showX').click(function() {
      $('.itemX').toggle(1000);
      return false;
  });
  </code></pre>