title: Find input box of a specific type as well as its value
body: <p>Please take a look at this <a href="http://jsfiddle.net/q9z4j/12/" rel="nofollow">fiddle</a>.</p>
  
  <p>I can use the following to find an input box with a specific value:</p>
  
  <pre><code>$('input[value="'+findtext+'"]');
  </code></pre>
  
  <p>but is it possible to find an input box of a specific type as well? This one won't work in the example:</p>
  
  <pre><code>$('input[type="checkbox" value="'+findtext+'"]');
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;button class="check"&gt;AAA&lt;/button&gt;
  
  &lt;input type="radio" value="AAA"&gt;This
  &lt;input type="checkbox" value="BBB"&gt;This
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code>$('.check').click(function(){
     var findtext = $(this).text();console.log(findtext);
     $('input[type="checkbox" value="'+findtext+'"]').attr('checked', true);
  
  });
  </code></pre>