title: Disable or Enable buttons based on some conditions
body: <p>In my app I have multiple divs which look like (The divs are created dynamically):</p>
  
  <pre><code>&lt;div class="form-group clearfix"&gt;
      &lt;div class="form-group first-name"&gt;
          &lt;input type="text" id="firstName0" class="signup-input firstName required" name="first[0]" placeholder=""&gt;
      &lt;/div&gt;
      &lt;div class="form-group last-name"&gt;
          &lt;input type="text" id="lastName0" class="signup-input lastName" name="last[0]" placeholder="optional"&gt;
      &lt;/div&gt;
      &lt;div class="form-group email"&gt;
          &lt;input type="text" data-index="0" id="inputMail0" class="signup-input mail" name="email[0]" placeholder="e.g. example@url.com" aria-invalid="true"&gt;
          &lt;span class="common-sprite sign-up-cross first"&gt;&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The names are dynamically generated according to the index (For example the are email[1], email[2].....).</p>
  
  <p>I have a button which should be disabled in case the field of the first name is <code>not empty</code> and the field of the email <code>is empty</code> and  the span hasn't a class of <code>disNone</code>.</p>
  
  <p>How should I disable the button according to above condition?</p>