Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to type in two text fields simulatenously (jQuery)

I was unsuccessful in finding a jQuery plugin that allowed me to write in two inputs simultaneously.

I'm trying to write a normal title in one field, and at the same time type in another input write the same text without special characters or spaces.

e.g.

Input 1: This is my Title!

Input 2: ThisIsMyTitle

like image 484
tester Avatar asked Jan 28 '26 16:01

tester


1 Answers

on keyup copy input value from current input into 2nd input, no plugin is required.

$("input#first").keyup(function(e){
  var val = $(this).val();
  val = val.replace(/[^\w]+/g, "");
  $("input#second").val(val);
});

something like that

like image 189
mkoryak Avatar answered Jan 31 '26 11:01

mkoryak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!