title: Check and Uncheck Checkbox when Table Row is Clicked
body: <p>Right now I have my script setup so that when each checkbox inside a table row is checked it performs the functions required (addClass and some others). </p>
  
  <p>I would also like the checkboxs to check/uncheck and perform the same functions when the individual table row is clicked.</p>
  
  <p><strong>Here is my code for the checkbox functions:</strong></p>
  
  <pre><code>$('input[type="checkbox"]').bind('click',function(e) {
          var $this = $(this);
          if($this.is(':checked')) { 
                 num += 1;
                 $('#delete_btn').fadeIn('fast');
                 $this.parents('tr').addClass('selected'); 
                 select_arr.unshift(this.id);
          } else { 
                 num -= 1;
                 if(num  &lt;= 0) { 
                  $('#delete_btn').fadeOut('fast'); 
                 }
             $this.parents('tr').removeClass('selected'); 
                 select_arr.shift(this.id);
          }
      });
  </code></pre>
  
  <p>What would be the best way to achieve the same result that this code does by just clicking the table row itself rather than the checkbox, but still allowing the checkboxes to function the same.</p>
  
  <p><strong>Here is the table:</strong>
  <img src="https://i.stack.imgur.com/a06y6.gif" alt="enter image description here"></p>
  
  <p>Thanks in Advance.</p>