title: jQuery If statement check for active classes of multiple elements
body: <p>I'm creating a form where if certain buttons have an active state (i.e have been checked) then my final continue button goes green. It's a check to make sure things have been filled in. Here is the jQuery code that I have come up with, but it doesn't seem to work. Any help would be much appreciated. Thanks for your time.</p>
  
  <pre><code>$( document ).ready(function() {
    if ($(".button").hasClass("active") &amp;&amp; ($(".amd").hasClass("amdactive") || $(".intel").hasClass("intelactive"))) {
      $(".build").addClass("active");
    } else {
      $(".build").removeClass("active");
    }
  });
  </code></pre>
  
  <p>The problem I have is that the .build class doesn't have the active class added to it. I'm not sure what I'm doing wrong. Will this function constantly check whether these classes are applied? Or does it only do it once on the page load? How can I make it keep checking? </p>