I made this code:
$('.change').keydown(function(){ var value = $(this).val(); var id = $(this).attr('id'); $('.'+id).text(value); });
It works great with 1 flaw. When I write something, it does not update my last inserted character. Therefore, when I start typing in โTest caseโ, the div is populated in order, although it stops at โTest casโ. As you can see, I am missing the last character.
How can I do this to add the last character?
source share