title: Using jQuery, how to locate an element when the Name and Value are known
body: <p>Thanks for reading this</p>
  
  <p>I thought I could use find(), but couldn't make it work. I know I can add IDs or classnames, but would like to know how with the current markup.</p>
  
  <p>Thanks</p>
  
  <p>Here is the HTML</p>
  
  <pre><code>&lt;input name="keywordCheckbox" type="checkbox" value="S" /&gt;
  &lt;input name="keywordCheckbox" type="checkbox" value="C" /&gt;
  &lt;input name="keywordCheckbox" type="checkbox" value="A" /&gt;
  </code></pre>
  
  <p>and the js</p>
  
  <pre><code>&lt;script language="Javascript" src="javascript/jquery-1.2.6.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/JavaScript"&gt;
  
   $(function(){
    $('[name="keywordCheckbox"]').bind("click",
     function() {
      if($(this).attr("checked") == true) {
       switch(this.value) {
        case "A":
         var $_this = $(this) ;
         $('[name="keywordCheckbox"]').each(function() {
          if($(this).val() != $($_this).val()) { $(this).attr("checked",false); }
         });
         break ;
        default:
   DOESN'T WORK --&gt; $('[name="keywordCheckbox"]').find('[value="A"]').attr("checked", false);}
        } // END Switch
      } // END If
    }); // End BIND
   }); // End eventlistener
   &lt;/script&gt;
  </code></pre>