title: Multiple number input, jquery .each if val() greater than, add class to element
body: <p>I need to loop through a list of input elements of a certain class name. and based on if the value of any of those inputs with the class of "attendeeQuantityInput" is greater than 0, then add a class to an element on a page, if any of those inputs with the class of "attendeeQuantityInput" then remove the class from the element.<br>
  I am using jQuery. I tried a .each() but for some reason I am not able to get the value of the input, check it and then add a class to an element.</p>
  
  <p>This is what I have tried so far:</p>
  
  <p>JS</p>
  
  <pre><code>$(".AddMinusButton").click(function (event) {
      memberZeroAttendees();
   });
  
   function memberZeroAttendees() {
  
      $("#MemberTotalAttendeesPage input[name=memAttendees]").each(function() {
          //alert($(this).val());
          if ($(this).val() == 0 || $(this).val() == null) {
              //alert($(this).attr("class"));
  
              $('#MemberTotalAttendeesPage .continueBtn').addClass('disabled');
          } else {
              $('#MemberTotalAttendeesPage .continueBtn').removeClass('disabled');
          }
  
  
      });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="MemberTotalAttendeesPage"&gt;
             &lt;div class="attendeesContainer"&gt;
                 &lt;h3&gt;Member Attendees&lt;/h3&gt;
                    &lt;ul class="productVariantList attendeesList"&gt;
                     &lt;li&gt;
                      &lt;span class="variantTitle"&gt;
                          Member Adult
  
                      &lt;/span&gt;
                      &lt;small&gt;Ages 19-64 &lt;/small&gt;
                      &lt;div class="variantQuantity"&gt;
                          &lt;span class="minusBtn AddMinusButton"&gt;-&lt;/span&gt;
                          &lt;input type="number" name="memAttendees" value="" placeholder="0" min="0" max="2" maxlength="2" id="memAdultInput" class="attendeeQuantityInput" /&gt;
                          &lt;span class="addBtn AddMinusButton"&gt;+&lt;/span&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;span class="variantTitle"&gt;
                          Member Junior
                      &lt;/span&gt;
                      &lt;small&gt;Ages 11-18 &lt;/small&gt;
                      &lt;div class="variantQuantity"&gt;
                          &lt;span class="minusBtn AddMinusButton"&gt;-&lt;/span&gt;
                          &lt;input type="number" name="memAttendees" value="" placeholder="0" min="0" max="2" maxlength="2" class="attendeeQuantityInput" /&gt;
                          &lt;span class="addBtn AddMinusButton"&gt;+&lt;/span&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
                  &lt;li&gt;
                      &lt;span class="variantTitle"&gt;
                          Member Child
                      &lt;/span&gt;
                      &lt;small&gt;Ages 3-10 &lt;/small&gt;
                      &lt;div class="variantQuantity"&gt;
                          &lt;span class="minusBtn AddMinusButton"&gt;-&lt;/span&gt;
                          &lt;input type="number" name="memAttendees" value="" placeholder="0" min="0" max="2" maxlength="2" class="attendeeQuantityInput" /&gt;
                          &lt;span class="addBtn AddMinusButton"&gt;+&lt;/span&gt;
                      &lt;/div&gt;
                  &lt;/li&gt;
  
                  &lt;li&gt;
                      &lt;span class="variantTitle"&gt;
                          Member Toddler
                      &lt;/span&gt;
                      &lt;small&gt;Ages 0-3 &lt;/small&gt;
                      &lt;div class="variantQuantity"&gt;
                          &lt;span class="minusBtn AddMinusButton"&gt;-&lt;/span&gt;
                          &lt;input type="number" name="memAttendees" value="" placeholder="0" min="0" maxlength="2" class="attendeeQuantityInput" /&gt;
                          &lt;span class="addBtn AddMinusButton"&gt;+&lt;/span&gt;
                         &lt;/div&gt;
                     &lt;/li&gt;
  
              &lt;/ul&gt;
             &lt;/div&gt;
  
             &lt;a href="#GATotalAttendeesPage" class="continueBtn"&gt;Continue&lt;/a&gt;
          &lt;/div&gt;
  </code></pre>