javascript - listen for input in a hidden input-field -
is there way, on document ready / page load, 1 can listen more 3 characters being typed in row don't else, while nothing else focused, , if event occurs transfer 3 characters , else typed after input-field of type text / search hidden— either display, visibility, or opacity css properties ?
i appreciate in doing this.
i have done label , radio-button / check-box hidden. because input click on label. not complex alpha-numeric input.
if can me part of achieving above, appreciate it.
should straight forward:
var keys = []; $(document).on('keypress', function(e) { keys.push( string.fromcharcode(e.which) ); if (keys.length > 2) $('input').fadein(400).val( keys.join('') ); });
Comments
Post a Comment