Guest User

Untitled

a guest
Jan 5th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. $( 'input[type=checkbox]' ).change( function(){
  2. var checked = $(this).is( ':checked' );
  3. var column = $(this).closest( 'td' ).index();
  4. var trs = $(this).closest( 'table' ).find( 'tr:not(:first)' );
  5. $(trs).each( function(i,tr){
  6. var td = $(tr).find( 'td' ).eq( column );
  7. if ( ! $(td).is( '.hour' ) )
  8. return;
  9. $(td).toggleClass( 'hour_checked', ! checked );
  10. $(td).toggleClass( 'no_phone_shift', checked );
  11. } );
  12. } );
Add Comment
Please, Sign In to add comment