I have this select input:
<select name="color_tarea" id="color_tarea" style="font-family: 'FontAwesome', Arial;" class="form-control">
<option value="danger" class="text-danger"> Máxima prioridade</option>
<option value="warning" class="text-warning"> Prioridade elevada</option>
<option value="info" class="text-info"> Información</option>
<option value="primary" class="text-primary"> Pouco importante</option>
<option value="success" class="text-success"> Cando se poda</option>
</select>
Every option has his own text color. Now I want to change the main color (selected option) with the color selected. I can't find a way with only CSS, how can I get the class of the selected option for changing it with jQuery?
Thanks in advance.
EDIT: The question marked as possible solution is not my solution. That is for changing the placeholder (text of an input when is no text written). I need the text on the main select box (not an option) changes with the color of the chosen option. I wonder this explains correctly the situation.