title: Jquery: how to trigger click event on pressing enter key
body: <p>I need to execute a button click event upon pressing key enter. </p>
  
  <p>As it is at the moment the event is not firing.</p>
  
  <p>Please Help me with the syntax if possible.</p>
  
  <pre><code>$(document).on("click", "input[name='butAssignProd']", function () {
     //all the action
  });
  </code></pre>
  
  <p>this is my attempt to fire click event on enter.</p>
  
  <pre><code>$("#txtSearchProdAssign").keydown(function (e) {
    if (e.keyCode == 13) {
      $('input[name = butAssignProd]').click();
    }
  });
  </code></pre>