title: jQuery toggle input when checkbox is checked
body: <p>I'm trying to build something like wordpress options section. When you click the checkbox you can toggle the display of the corresponding <code>&lt;input type="text"&gt;</code> field, I want to do this all in one function so I don't have tons of different functions so what would be the best way to toggle the corresponding input with the checkbox, I made a quick jsFiddle but when I use my checkbox it toggles all the inputs because I'm selecting all of them obviously, so what would be a better solution using like <code>this</code> or something so toggle the corresponding field, thanks in advance, <a href="http://jsfiddle.net/MEC9n/" rel="nofollow">http://jsfiddle.net/MEC9n/</a></p>
  
  <p><strong>HTML</strong> </p>
  
  <pre><code>&lt;div class="options"&gt;
      &lt;input type="checkbox" name="title"&gt;&lt;label&gt;Title&lt;/label&gt;
      &lt;input type="checkbox" name="author"&gt;&lt;label&gt;Author&lt;/label&gt;
      &lt;input type="checkbox" name="category"&gt;&lt;label&gt;Category&lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="container"&gt;
      &lt;form method="post"&gt;
          &lt;input type="text" name="title" placeholder="Title:"&gt;
          &lt;input type="text" name="author" placeholder="Author:"&gt;
          &lt;input type="text" name="category" placeholder="Category:"&gt;
          &lt;input type="submit" value="Submit"&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>jQuery</strong></p>
  
  <pre><code>   $(document).ready(function(){
          $('input[type="checkbox"]').click(function(){
              $('input[type="text"]').toggle();
          });
      });
  </code></pre>