function addButtonHandlers() {
    $('button.unblock').map(function() {
       $(this).click(function() {
            var id = this.id.split('-')[1];
            unblockUser(id);
            $(this).parents('tr').remove();
        });
    });
}
/*
 * attach unblock handler to each button
 */
attach unblock handler to each button
attach unblock handler to each button
function addButtonHandlers() {
    $('button.unblock').map(function() {
       $(this).click(function() {
            var id = this.id.split('-')[1];
            unblockUser(id);
            $(this).parents('tr').remove();
        });
    });
}
function addButtonHandlers ( ) { $ ( 'button.unblock' ) . map ( function ( ) { $ ( this ) . click ( function ( ) { var id = this . id . split ( '-' ) [ 1 ] ; unblockUser ( id ) ; $ ( this ) . parents ( 'tr' ) . remove ( ) ; } ) ; } ) ; }
attach unblock handler to each button
attach unblock handler to each button