inserting a variable on style tag
===

I need to change the color of the text based on the drop down list selection.

     <select id="room2">
       <option>#0808cf</option>
       <option>#0E9E26</option>
     </select>
       <input type="text" id="txtColor">
       John: <p style="color:#0808cf" > test </p>
jquery

     $('#colors').change(function(){
       $('#txtColor').val($("#colors").val());
       var fontColor =  $('#txtColor').val();

     });
 

I dont want the change to be in the css cause the select id will not be constant. I want it to be inserted in the p style tag. And also i need the text to be John: test to be in one line. I tried this but not working. Thank you.

       <p style="color:"+fontColor+" > test </p>
          

demo: http://jsfiddle.net/kX3EN/