<input name="e-1" id="e-1" type="text" value=""/>
<input name="e-2" id="e-2" type="text" value=""/>
I need a Jquery code, which will immediately add the Input values here
<div id="x"></div>
My code isn’t work:
$(document).ready(function() {
$('input#e-1').bind('blur keyup',function() {
if($('input#e-1').val()) {
$('#x').html($('input#e-1').val());
}
});
});
If you mean that when you delete input (ie with
backspaceor by selecting all and then pressingDEL) the last character will stay visible in the div then thats because you haveif($('input#e-1').val())test there, just delete it and it should work, ie