input field is empty or full event
I have an input field and I have a text, which is my button in this case.
So, the scenario is that whenever, the input field is filled out (with numbers, texts and etc.) then the button (text) turns to red, in order to show it is activated.
However, when the input is not filled or not clicked by user, the text is light grey and inactivate. So, even when one tries to click on the text with out filling out the input field, the text color doesn't change.
Now, I want to simulate this action and I don't know how I can set an event which describe, input is filled, input is not filled (or clicked). I played around a little bit with giving them some value (like when it is clicked is 1, when not is 2) but it doesn't work for me.
Thanks for the help.