0

I want to reuse the thing just typed in an input. But there is 'always' a delay of one letter.

I must be missing something but I dont understand Why am I not getting the value I just typed in ?

Here is a working fiddle : https://jsfiddle.net/Baldrani/c9zutks9/

This is the code :

$('#cleaningFeed').keypress(function(){
    $('.res').html($(this).val())
});
Baldráni
  • 5,332
  • 7
  • 51
  • 79

1 Answers1

2

Use keyup() instead:

$('#cleaningFeed').keyup(function(){
    $('.res').html($(this).val())
});
WillardSolutions
  • 2,316
  • 4
  • 28
  • 38
  • What the heck --' How does that make even sense... :( anyway that's the answer thank you. Im going to read right away the documentation. – Baldráni Apr 20 '16 at 21:22