Aug-06-2018, 02:35 PM
I am hoping this will be really simple, and i am just missing the obvious.
Any help would be appreciated.
<select class='pets' type='text' name='pets' id='pets' placeholder='Select a Pet...'> <option value='' disabled selected>Select a Pet...</option> <option>Dog</option> <option>Cat</option> </select>Using the following code as a basic example, what i want to do is when there is no pet selected the select box background be one colour, e.g. 'red'. When a pet has been selected I would like the background to change to another colour, e.g. 'green'.
Any help would be appreciated.