<input class="foo" type="text" />
<button>click</button>
$('button').click(function(){
var e = $.Event('keypress');
e.which = 65; // Character 'A'
$('.foo').trigger(e);
});
I try to trigger a keyboard event and add text into input text.
for some reason, I cant use = html or text(), I must trigger keyboard event
anyone know how to fix this?
value(or in jQueryland where things have to be different, just for the sake of being different,val) - nottextorhtml