title: javascript conditional statement using &&
body: <p>I am attempting to change the state of a button if all of three specific elements have a specific class applied.</p>
  
  <p>Previously I was simply counting the number of li's with the class "complete" but now I need to be more specific.</p>
  
  <pre><code>$("#signUp li").click(function(){
      $(this).addClass("complete");
      //    if($("#signUp li.complete").length &gt;= 3){
  
          if(  $ ( "#signUp li:first-child" &amp;&amp; "#signUp li:nth-child(5)" &amp;&amp; "#signUp li:nth-child(7)" ).hasClass( "complete" ) )
          {
          $("#done").addClass("active");
          };
      });
  </code></pre>
  
  <p>I've tried this and some variations thereof but the best result has been to meet the criteria when the last li's class is set to "complete"</p>
  
  <p>I've been poking around a bit but couldn't find a specific instance that matches my situation.</p>
  
  <p>Always thanks for awesome responses that educate and correct my amateur ways.</p>