title: How to check all checkbox with the same value from another column
body: <p>Hi I'm trying to check all checkbox for each <code>row</code> on my table when my <code>Dropdown menu</code> value is <code>Sent</code> and the value of <code>Status Column</code> is equal to <code>Sent</code>. I'm now able to check/uncheck all checkbox on my table. But now I need to check all those status is <code>Sent</code> when the dropdown menu is also <code>Sent</code>. I appreciate all answers. Please check my code below. Thanks a lot</p>
  
  <p><strong>view.html</strong></p>
  
  <pre><code>                   &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;td&gt;&lt;strong&gt;&lt;input type="checkbox" id="checkAll"&gt;Check All&lt;/strong&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;strong&gt;Status&lt;/strong&gt;&lt;/td&gt;
  
                      &lt;/tr&gt;
                     &lt;/thead&gt;
  
                 &lt;tbody&gt; &lt;tr&gt;
                      &lt;td&gt;&lt;input type="checkbox"/&gt;&lt;/td&gt;
                      &lt;td value="Sent"&gt;Sent&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;
                      &lt;td value="Created"&gt;Created&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;input type="checkbox"/&gt;&lt;/td&gt;
                      &lt;td value="Created"&gt;Created&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;
                      &lt;td value="Sent"&gt;Sent&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;tr&gt;
                      &lt;td&gt;&lt;input type="checkbox" /&gt;&lt;/td&gt;
                      &lt;td value="Sent"&gt;Sent&lt;/td&gt;
                  &lt;/tr&gt; &lt;/tbody&gt;
  
                 &lt;select class="form-control" id="default-select"&gt;
  
                &lt;option value="delete"&gt;Created&lt;/option&gt;
                &lt;option value="stored"&gt;Stored Status&lt;/option&gt;
                &lt;option value="sent"&gt;Sent Status&lt;/option&gt;
                                    &lt;/select&gt;
  </code></pre>
  
  <p><strong>script.js</strong></p>
  
  <pre><code>$("#checkAll").click(function(){
      if($('#default-select option:selected').val() == 'sent'){
      $('#testTable tbody input[type="checkbox"]').prop('checked', this.checked);
  }});
  </code></pre>