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 input event trigger whenever content of text area getting changed. not hold key press information of event.which. instead can use keypress or keydown or keyup events separately track key code.

but virtual keyboard try fiddle

hope helps you!


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -