Answer the question
In order to leave comments, you need to log in
How to check class change automatically?
It is necessary that all input type="text" fields constantly (or every millisecond) automatically check for the presence of the success class, and if all fields have such a class, the button color changes to red, and if not all or none of them - to grey.
The form:
<form id="post_form">
<input id="title" class="post success">
<input id="price" class="post">
<input id="color" class="post invalid">
<button>Создать</button>
</form>
Answer the question
In order to leave comments, you need to log in
constantly (or every millisecond) the presence of the success class was automatically checked
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question