I have a registration page. There I have a form with 2 required inputs - email and password.
<div class="row row_registration">
<label for="email">Электронная почта</label>
<div class="row-w">
<input id="email" name="email" class="text v" required="required" type="email" value="">
</div>
</div>
<div class="row row_registration">
<label for="password">Пароль</label>
<div class="row-w">
<input id="password" name="password" class="text eq" minlength="7" required="required" type="password" value="" maxlength="14">
</div>
</div>
Also I have a submit button (surprise!), which has an attribute "disabled".
var checkRequiredInput = function(){
if($("#email").val().length > 0 && $("#password").val().length > 0) {
$(".registration__button button:submit").attr("disabled", false);
}
};
I bind keyup on inputs. And! I run this function when document is ready.
checkRequiredInput();
$("#email, #password").on("keyup", function(){
checkRequiredInput();
});
But I have some values on this page that google chrome puts in my inputs and it happenes.. when?
Because my function changes nothing when I run it when document is ready. I understand, that on this moment inputs are empty. I can't use setTimeOut because of different internet connection.
Does any event or something exist to bind the moment when chrome does this.