title: Simulate enter key in jquery or javascript
body: <p>I am trying to let jquery press the enter for me when the page loads. I already tried a few things, but they did not work. I would rather not use any plugins. So what i want is that jquery puts the focus on my input field and presses enter. This is my current code.</p>
  
  <pre><code>$(document).ready(function() {
  
      $('#test').focus().trigger({ type : 'keypress', which : 13 });
  });
  </code></pre>