This is the code i am trying to get to work, i could not work out why JQ will not pick up the #cols1 var from the inputbox.
This is a basic example of the code i am using.
<html>
<head>
<script type='text/javascript' src='http://code.jquery.com/jquery-2.1.0.min.js'>
</script>
<script type='text/javascript'>
function changeCon()
{
var cols1 = $('#col1').value;
$('#div1').html('Random text');
$('#div1').css({ backgroundColor: "#cols1" });
}
function startup()
{
$('#bt1').click(changeCon);
}
$(startup);
</script>
</head>
<body>
<input id='col1' type='text' /> <br />
<div id="div1">text div.</div>
<input type="button" id="bt1" value="Submit" />
</body>
</html>
If anyone know's why, it would be great cheers.