Hello i have two inputs and when im writing in the first input, with keyup jquery function im writing automatically in the second input field.
But I want to write line instead of space to the second input field when im clicking the spacebar.
For example:
First input: Hello world,
Second input: Hello-world
I have the following code:
$(".firstInput").keyup(function(e) {
val = $(this).val();
if( e.keyCode == 32 ) {
val += "-";
}
$(".secondInput").val( val );
});