title: Make two input with same data value?
body: <p>I have two inputs(number).</p>
  
  <p>How can I duplicate data from first to second and back?</p>
  
  <p>For example, I'll set some value in first input and in second input I get same value and if I set same value in second input I want to get same value in first input.</p>
  
  <p>I think it must be something like that</p>
  
  <pre><code>&lt;div class="first"&gt;
      &lt;input type="text" id="email"&gt;
  &lt;/div&gt;  
  &lt;div class="second"&gt;
      &lt;input type="text" id="name"&gt;
  &lt;/div&gt;
  &lt;div id="slider"&gt;&lt;/div&gt;
  
  &lt;script&gt;
  $('#email').change(function(){
      $(this).val($('#name').val());
  });
  ('#name').change(function(){
      $(this).val($('#email').val());
  });    
  $('#slider').slider();
  &lt;/script&gt;
  </code></pre>
  
  <p><a href="https://jsfiddle.net/Frunky/hzh9zwfo/4/" rel="nofollow noreferrer">https://jsfiddle.net/Frunky/hzh9zwfo/4/</a></p>
  
  <p>When I'm trying to put smth in slider() function I get error in console (slider function doesn't exist)</p>
  
  <p>Thanks.</p>