title: jquery keypress/keydown to call function
body: <p>my previous question:</p>
  
  <p><a href="https://stackoverflow.com/questions/15819713/jquery-store-input-value-into-empty-array-element">This</a></p>
  
  <p>sweetamylase posted her fiddle <a href="http://jsfiddle.net/amyamy86/jSyfy/" rel="nofollow noreferrer">http://jsfiddle.net/amyamy86/jSyfy/</a> , which is great and very close to what I am trying to achieve, but I am having trouble getting it so that pressing enter will trigger the same as clicking the button. </p>
  
  <p>I tried this and other variations</p>
  
  <pre><code>$("input").keypress(function(event) {
      if (event.which == 13) {
          event.preventDefault();
         FoodDispaly();
      }
  });
  </code></pre>
  
  <p>but haven't gotten it to work </p>