title: Selecting ID + any number in jquery
body: <p>I'm new to stackoverflow and jQuery altogether, so I'm having a little trouble making a simple function.</p>
  
  <p>I basically have in my website a random number of links with <code>id "filtro" + "some number"</code>, and I want to write only one code to the action of clicking in any of them (that would later impact on the class with same "filtro" + "some number"). </p>
  
  <p><strong>Eg.: Click "#filtro3", do something on ".filtro3".</strong></p>
  
  <p>The problem is, I don't know how to write the string in jQuery for "any number". I'm thinking about doing something like this:</p>
  
  <pre><code>$(function () {
      $("#" + "filtro" + SOME NUMBER).click(function () {
              //Do something with the element "." + "filtro" + SOME NUMBER
      });
  });
  </code></pre>
  
  <p>Any ideas? Thank you!!</p>
  
  <p>Ps.: This is my first question, and I apologize if I made any mistakes.</p>
  
  <hr>
  
  <p>SOLVED. dystroy's solution worked like a charm.</p>
  
  <p>For future reference to others, I was making this code to make a simple <strong>filter menu for a picture gallery</strong>. This way I could hide/show pictures of certain topics.</p>