I want make the submit button disabled until all field are completed, I search in stackoverflow, but I can't apply codes. I try this, but then filled fields same disabled button.

```
  <form action="login" method="post">
                    <input type="text" name="email" id="email" class="input_class_big_e" placeholder="Email"/><br>
                    <input type="password" name="password" id="password1" class="input_class_big_p1" placeholder="Password"/><br><br>
                    <input type="submit" id="confirm_button_login" value="Login"/>
       </form>

```

JQuery:

```
$(document).ready(function (){
      if ($('#email, #password1').val().length == 0) {
        $("#confirm_button_login").attr('disabled', 'disabled');
      }
      else {
        $("#confirm_button_login").removeAttr('disabled');
      }
    });

```

[JSFiddle](https://jsfiddle.net/pcbkg3Lc/)