title: Open JQuery Datepicker by clicking on an image w/ no input field
body: <p>I want to have the JQuery Datepicker open when the user clicks on an image. There is no input field where the selected date appears afterwards; I'm just going to save the entered date to the server via Ajax.</p>
  
  <p>Currently I have this code:</p>
  
  <pre><code>&lt;img src='someimage.gif' id="datepicker" /&gt;
  
  $(document).ready(function() {
      $("#datepicker").datepicker({
              changeMonth: true,
              changeYear: true,
          }).click(function() { $(this).datepicker('show'); });
   });
  </code></pre>
  
  <p>But nothing happens when I click on the image. I have also tried saving the result of the datepicker() call to a global var and then calling datepicker('show') from the onclick() event of the image, but same result.</p>