jquery - Keyup event for textarea -
i using virtual keyboard plugin http://mottie.github.io/keyboard/.
here, in mottie textarea want fire keypress event, can use physical keyboard enter text in seleted laguage.
i tried this
$('textarea[name=notes]').keypress(function (e) {}); and also
$("div.ui-keyboard-preview-wrapper").find('textarea[name=notes]').keypress(function (e) {}); i tried
$(".ui-keyboard-preview").keypress(function (e) {}); but, not triggering event. there anyway this?
try input event below code snippets. track changes in textarea field. older version of ie propertychange event can used track changes.
sample code snippets:
$(document).on('input propertychange', "textarea[name='notes']", function () { alert("text updated"); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <textarea name="notes" rows="4" cols="50"> text </textarea> note:
the
inputevent trigger whenever content of text area getting changed. not hold key press information ofevent.which. instead can usekeypressorkeydownorkeyupevents separately track key code.
but virtual keyboard try fiddle
hope helps you!
Comments
Post a Comment