I’m trying to create the illusion of transparent text in a colorpicker by dynamically setting the text color to match the background color.
There seems to be something wrong with the last line of jquery.
So far, what I have is this:
$('.color').blur(function()
{
id = $(this).attr('id');
id = id.substring(0,id.length-6);
$(id).css('color',$(this).css('background-color'));
});
and
<div id="header-wrapper">
<input class="color" id="header-wrapper-color" value="#303030">
<div id="header">
...
</div>
</div>
FIDDLE