title: jQuery detect when total value of counters are 0
body: <p>I have a slight problem that I do not know how to approach due to my lack of Javascript experience. Basically I have two or more counters that each count upwards or downwards separately. <strong>I want to run a function when all of the counters total value equals to 0</strong> 
  But I do not know how to extract that value from the functions that someone wrote for me. </p>
  
  <p>Here is a jsFiddle for the counters
  <a href="http://jsfiddle.net/RoryMcCrossan/puJ6G/1015/" rel="nofollow">http://jsfiddle.net/RoryMcCrossan/puJ6G/1015/</a></p>
  
  <hr>
  
  <pre><code>jQuery(document).ready(function () {
  $('.qtyplus').click(function (e) {
      e.preventDefault();
      var $container = $(this).closest('.count-container');
      var $field = $container.find('input[name=' + $(this).data('field') + ']');
      var currentVal = parseInt($field.val(), 10);
      if (!isNaN(currentVal)) {
          $field.val(currentVal + 1);
      } else {
          $field.val(0);
      }
  });
  
  $(".qtyminus").click(function (e) {
      e.preventDefault();
      var $container = $(this).closest('.count-container');
      var $field = $container.find('input[name=' + $(this).data('field') + ']');
      var currentVal = parseInt($field.val(), 10);
      if (!isNaN(currentVal) &amp;&amp; !currentVal == 0) {
          $field.val(currentVal - 1);
      } else {
          $field.val(0);
      }
  });
  </code></pre>
  
  <p>});</p>
  
  <p>Many thanks! :)</p>