I try to trigger the event while changing the value in textarea. I bind the change input paste keyup
and its works fine when I type the content manually or paste. But I dont know how to trigger when changes occur using jquery. $("#inptxt").val("Jquery");
HTML
<textarea id="inptxt" ></textarea>
<div id="res" ></div>
<input type="button" value="click" id="but" />
jQuery
$("#inptxt").on("change input paste keyup", function() {
$("#res").html(jQuery(this).val());
});
$("#but").bind("click",function(){
$("#inptxt").val("Jquery");
});
Example Fiddle