I'm trying to check if input was changed or not. Problem is - if i'll use this code:
trigger.keyup(function() {
current_input = getSearchString();
is_changed = (current_input != previous_input);
previous_input = current_input;
});
This logic will break when user will press, for example "Q", after a short delay "E" (input value will be "QE" already) and release "Q" key first. previous_input will be set to "QE". User releases "E" key and script compares equal strings. So, when input actually did change, for my script it is not. Any idea how to fix this or is there any different way to do this (not with html5 event 'input')?
keydownhelp here?onchangetells you when it changed.