jquery trigger function is not working no error nor correct result
<p>hey guys i have the ff code,it gives alert msg  when i <strong>manualy</strong> do it.<br>
bt i want to do it programatically using jquery as follows:<br>
the html code:  </p>

<pre><code> &lt;input type="text" id="inpt" /&gt;  
</code></pre>

<p><strong>js code:</strong>  </p>

<pre><code>   $("#inpt").keypress(function(e) {  
      if (e.keyCode == '13') {  
         alert("enter key pressed");  
      }  
   });   
</code></pre>

<p>//call the abv event handler</p>

<pre><code> r=$("#inpt");  
    r.focus();  
    e = $.Event('keypress');  
    e.which =13; // ENTER_KEY  
    $(r).trigger(e);
</code></pre>

<p>It doesnt show an alert message and there is no error message<br>
pls help!</p>
