trigger a keypress on click event
<p>This code does not work for me:</p>

<pre><code>var e = jQuery.Event("keypress");

e.which = 43; // # Some key code value

$(document).trigger(e);
</code></pre>

<p>Is there anyway to trigger it virtually?</p>

<pre><code>$("input#genres").live('click', function(){

 var value = $(this).val();

 if($(this).is(':checked')) { 

 $("input.maininput").val(value);
 var e = jQuery.Event("keypress");

    e.which = 13; // # Some key code value

    $("input.maininput").trigger(e);

}

});
</code></pre>

<p>This is my whole code but still no luck.</p>
