title: Uncheck table row in bootstrap table on specific condition
body: <p>My previous question was <a href="https://stackoverflow.com/questions/32134884/getting-values-of-selected-table-rows-in-bootstrap-using-jquery">this</a> and I want to uncheck checked row if user selects a row that has 'Stock Available=null or 0'. Now my jquery code is:</p>
  
  <pre><code>$(document).ready(function()
  {
      $("#add_cart_btn").hide();
      var json;
      var checkedRows = [];
      $('#table-style').on('check.bs.table', function (e, row) {
        checkedRows.push({id: row.id});
        $("#add_cart_btn").show();
      });
  
      $('#table-style').on('uncheck.bs.table', function (e, row) {
        $.each(checkedRows, function(index, value) {
          if (value.id === row.id) {
            checkedRows.splice(index,1);
          }
        });
      });
       /*if(checkedRows.length &lt; 0) {
          // does not exist
          $("#add_cart_btn").hide();
        }
        else {
          // does exist
          $("#add_cart_btn").show();
        }*/
  
  });
  </code></pre>
  
  <p>Here I'm also trying to show $("#add_cart_btn") button iff checkedRows[] contains at least one record. I searched bootstrap events for above but can not understood it.</p>