I am trying to set a function with parameter color. I am then trying to get the input text thats typed in and to change colour of the div according to the text input by passing through the parameter.

My current attempts are not working, any help or ideas please?

**html snippet**

```
    <div class="bulb" id="bulb1"></div>
    <button id="setColor">Color set</button>
    <input type="text" id="colorText"></input>

```

**jquery**

```
$( document ).ready(function() {

    $('#setColor').click(function()
    {
        $( "#colorText" ).is( color );

        setColor(color);

        $('#colorText').val('');

    });

});

function setColor(color){

    $('#bulb1').css({'background-color': color});   

}

```