title: jquery change values of 2 input text field
body: <p>I want to create 2 text fields which will change at same time</p>
  
  <pre><code>&lt;input type="text" class="text1"&gt;
  &lt;input type="text" class="text2"&gt;
  </code></pre>
  
  <p>They are created dynamically, so my code is:</p>
  
  <pre><code>$("body").on("keyup", function() {
      $(".text2").val($('.text1').val());
  });
  </code></pre>
  
  <p>It works only when changing text1.
  How can I write my script so I could change text2 too?</p>
  
  <p>Thank you!</p>