title: change text box text if checkbox is checked
body: <p>I want to change text box text depending if checkbox is checked or not. So if the user checks the checkbox, the text box shows some text and if the user unchecked the checkbox, it shows some different text.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;input id="check" type="checkbox" /&gt;
  &lt;input id="txt" type="text" value="aaaa" /&gt;
  </code></pre>
  
  <p><strong>jQuery:</strong></p>
  
  <pre><code>$('input[type=checkbox]').each(function () {
      if (!$('input[type=checkbox]').is(':checked')) {
          $('#txt').val('checked');
      }
      else{
          $('#txt').val('unchecked');
      }
  });
  </code></pre>
  
  <p><strong><a href="http://jsfiddle.net/15L2vq3k/" rel="nofollow">JSFiddle Demo</a></strong></p>