style the thumb of range input with jquery

I want to change the background color of the thumb with jquery. I tried the following:

<input id="size" type="range" name="size" min="2" max="10" step="0.01" value="5">

    var col = ($(this)[0].checked) ? '#000' : '#FFF';
    $('input[type=range]::-webkit-slider-thumb').css('background-color', col);

But this gives me an

syntax error, unrecognized expression

How do i do this with Jquery?