Hello I am trying to simulate pressing enter in an input box I been trying with:
var e = $.Event('keypress');
e.which = 13;
$('#inputdId').trigger (e);
But it didn't work out. Where is the mistake?
Thanks
Hello I am trying to simulate pressing enter in an input box I been trying with:
var e = $.Event('keypress');
e.which = 13;
$('#inputdId').trigger (e);
But it didn't work out. Where is the mistake?
Thanks
I found a way:
var e = jQuery.Event( 'keydown', { which: 13 } ); jQuery('input').trigger(e);