I am in need of assistance with a div
structure similar to this:
<div id="namacoc" tabindex="1" class="filled-text" placeholder="Input your name" contenteditable ></div>
<div id="position" tabindex="1" class="filled-text" placeholder="Input your position" contenteditable></div>
<button type="button" id="btncontinue" class="btn btn-wide btn-blue">Continue</button>
My issue revolves around validating the div
elements.
For example: If the namecoc
div does not have a value, I want it to change color to red
. Once a value is inputted, the color should return to its normal state (black) when the user selects another div or presses a button.
NOTE: I opted for a div instead of an input form because Bootstrap was not changing the text background color on active states. Therefore, I decided to use a div
element. Please excuse any language errors as English is not my primary language.