title: jQuery run same code for two different events
body: <p>I have a form with a submit button. </p>
  
  <p>I'd like to run the same piece of code for when the user clicks submit or they hit Enter.</p>
  
  <p>This is the code so far:</p>
  
  <pre><code>    $('#submit').click(function(){
  
              //code
  
              return false;
      });
  </code></pre>
  
  <p>but i'd like to run the same "code" when the user hits the enter key whilst focused on the input with id = "artistName"</p>