title: Trigger Keypress event of a input field on keypress of another input field?
body: <p>I have two input fields i want to trigger keypress of one input field on keypress of another input field.</p>
  
  <p>What i have tried is </p>
  
  <pre>
  <code>
  $('#example').keypress(function(event) { 
  
     var press = jQuery.Event("keypress");
     var code = event.keyCode || event.which;
     press.which = code ;   
     $('#search').trigger(press);
  
  });
  </code>
  </pre>
  
  <p>both example and search are input fields. Why i am doing so i because when i enter text in simple field it has to enter text in another field which filters search results.</p>