I'm trying to change the background color of my :before element with a php variable. The variable neatly returns a hex code like #123456. I tried this piece of jQuery/javascript to get this working, but it isn't. Does anyone know what I'm doing wrong?
<script>
$(document).ready(function(){
$('#tpl-contact:before').css("background", "<?=$sColor;?>");
});
</script>