I have a div that changes depending on whether the form was submitted correctly or not.
I wanted to know if it is possible to check a specific element for a class or not?
The launch of an element is as follows.
<div id="myerrortest" class="input text"></div>
If the input is incorrect, add an error class.
<div id="myerrortest" class="input text error"></div>
source
share