There are two textareas which has the exact same text formatting. IDs are textareaA
and textareaB
.
I've set some stuff to happen for textareaA keyup. My question is How do I set a textareaB
to resize its WIDTH while the user is typing in textareaA
?
This is what I tried but no luck.
$(document).on("click blur keyup", ".fT", function() { // keyup responds with textareaA
var newWidth = $("#textareaA").val(); //does not work
$("#textareaB").width(newWidth);
});