Enabling a checkbox when text inputs are not empty

Enabling a checkbox when text inputs are not empty

I have some text inputs and one checkbox:
  1. <input type="text">
  2. <input type="text">
  3. <input type="text">
  4.     
  5. <input type="checkbox">

I want to disable the checkbox and enable it when all text inputs will be not empty.

I have this code, but it doesn't work:
  1.   $(document).ready(function () {
  2.     var empty;
  3.     
  4.     $('input[type="checkbox"]').prop({
  5.       disabled: true
  6.     });
  7.     
  8.     $('input[type="text"]').keyup(function(){
  9.       $('input[type="text"]').each(function(){
  10.         if($(this).val().length == 0) {
  11.           empty = true;
  12.         }
  13.       });
  14.     });
  15.     
  16.     if(empty == true) {
  17.       $('input[type="checkbox"]').prop({
  18.         disabled: true
  19.       });
  20.     }
  21.   });
Could you help me?