Skip to content

Instantly share code, notes, and snippets.

@philipmadeley
Last active September 16, 2015 01:59
Show Gist options
  • Save philipmadeley/6360387bf68021ccc501 to your computer and use it in GitHub Desktop.
Save philipmadeley/6360387bf68021ccc501 to your computer and use it in GitHub Desktop.
input_checked_or_row_hover
$(document).ready(function() {
$('.table-list tr').click(function(e){
if(e.target.type !== 'checkbox') {
$(':checkbox', this).trigger('click');
}
});
var $action = $(".action-btn").hide(),
$inputs = $('.table-list input').click(function() {
$action.toggle( $inputs.closest('input:checkbox').is(":checked") );
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment