html - find auto change in next input type text in jquery -


i have 2 inputs of type text interconnected.

upon entering value in 1st textbox, 2nd textbox auto completed , populated value.

at moment when value in 2nd textbox changed, want value of 2nd textbox using jquery.

i have tried .blur , .change function not getting called desired.

you need use keyup function detect changes occurs. see sample code below..

$('#t1').keyup(function(){    $('#t2').val($('#t1').val()); }); $('#t2').keyup(function(){    $('#t1').val($('#t2').val()); }); 

refer link example


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -