title: .click() On Dynamically Named Element
body: <p>I'm unsure of the terminology used in jquery, but I have this function:</p>
  <pre><code>$(function () {
      // open file explorer window
      $(&quot;.js-upload-photos&quot;).click(function () {
          // get the id of button
          var button_id = $(this).attr('id');
          // use this id to call correct fileupload input
          var fileupload = (&quot;#fileupload&quot;).concat(button_id)
          $(fileupload).click();
      });
  </code></pre>
  <p>When my button is pressed, I get the <code>id</code> attached to it, then call the appropriate hidden <code>input</code> element.</p>
  <p>I need my <code>$(...).click();</code> to be dynamic, as I have many of the same button/input pairs on my page for many different file uploads.</p>
  <p>My current implementation doesn't work.</p>
  <p>PS - I believe I need an <code>on()</code> method, but my attempts have failed.</p>
  <p>Thank you.</p>