title: Bootstrap table-striped does not change color
body: <p>As you can see in the history of my questions recently, I am trying to understand Jquery/Javascript :) I run into the following problem and would like to propose it to you guys.</p>
  
  <p>I have the following table (note: this is the HTML grabbed by inspect element, I am not sure why style="background-color: rgb(255, 255, 255); is there..):</p>
  
  <pre><code>&lt;table class="table table-striped table-condensed" id="instance-table"&gt;
      &lt;thead&gt;
          &lt;tr id="checkrow"&gt;
              &lt;th&gt;&lt;input type="checkbox" id="checkall"&gt;&lt;/th&gt;
              &lt;th&gt;Column A&lt;/th&gt;
              &lt;th&gt;Column A&lt;/th&gt;
              &lt;th&gt;Column A&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody id="instanceInnerContent"&gt;
          &lt;tr style="background-color: rgb(255, 255, 255);"&gt;
              &lt;td class="act"&gt;&lt;input type="checkbox"&gt;&lt;/td&gt;
              &lt;td&gt;Value 1&lt;/td&gt;
              &lt;td&gt;Value 2&lt;/td&gt;
          &lt;/tr&gt;
              &lt;tr style="background-color: rgb(255, 255, 255);"&gt;
              &lt;td class="act"&gt;&lt;input type="checkbox"&gt;&lt;/td&gt;
              &lt;td&gt;Value 1&lt;/td&gt;
              &lt;td&gt;Value 2&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>And using the following code to select the row or select them all or select on row click:</p>
  
  <pre><code>// if user clicks on checkbox with id="checkall" - all checkboxes are selected
  // and table row background is highlighted
   $('body').on('click', '#checkall', function () {
      $('input:checkbox:not(#checkall)').prop('checked',this.checked);
      if ($(this).is(':checked') == true) {
          $("#instance-table").find('tr:not(#checkrow)').css("background-color","#ccc");
          //$('#instance-action').removeAttr('disabled');
      } else  {
          $("#instance-table").find('tr:not(#checkrow)').css("background-color","#fff");
          //$('#instance-action').attr('disabled', 'disabled');
      }
  });  
  
  // if user clicks on checkbox, diffrent than checkbox with id="checkall" , 
  // then checkbox is checked/unchecked
  $('body').on('click', 'input:checkbox:not(#checkall)', function () {
      if($("#checkall").is(':checked') == true &amp;&amp; this.checked == false) {
          $("#checkall").prop('checked',false);
          $(this).closest('tr').css("background-color","#ffffff");
      }
      if(this.checked == true) {
          $(this).closest('tr').css("background-color","#ccc");
          //$('#instance-action').removeAttr('disabled');
          // function to check/uncheck checkbox with id="checkbox"
          CheckSelectAll(); 
      }
      if(this.checked == false)  {
          $(this).closest('tr').css("background-color","#ffffff");
          //$('#instance-action').attr('disabled', 'disabled');
      }
  });
  
  // if user clicks, someware on table row, checkbox is checked/unchecked
  // and table row background is highlighted or not
  $('body').on('click', '#instance-table tbody tr', function () {
      var this_row = $(this);
      var checkbox = this_row.find('input:checkbox');
      if (event.target.type !== 'checkbox') {    
          if ( checkbox.is(':checked') == false ) {
              checkbox.prop('checked', true);
              this_row.css("background-color","#ccc");
              //$('#instance-action').removeAttr('disabled');
              CheckSelectAll();
          } else {
              checkbox.prop('checked', false);
              this_row.css("background-color","#fff");
              //$('#instance-action').attr('disabled', 'disabled');
              CheckSelectAll();
          }
      }    
  });
  
  function CheckSelectAll() {
   var flag = true;
   $('input:checkbox:not(#checkall)').each(function() {
    if(this.checked == false)
     flag = false;
     //console.log(flag);
   });
    $("#checkall").attr('checked',flag);
   }
  </code></pre>
  
  <p>But somehow the striped table row does not get highlighted, how come?
  And while the code is here already, I also have a problem where it does not check the checkall checkbox if I check each row manually. It works when I manually check the checkall checkbox, uncheck each checkbox and then manually check each row again. I cannot find the error.</p>