$(document).ready(function(){
   $("#nu_username").keyup(function(){

      var username = $(this).val().trim();
      
      if(username != ''){

         $.ajax({
            url: 'checkUser.php',
            type: 'post',
            data: {username: username},
            success: function(response){
                $("#button_response").html(response);
             }
         });
      }else{
         
      }

    });

 });