Color Picker

murray-johnson

New member
Hi, just discovered your website and this is an awesome product. Thank you for this! Following your guides, I have muddled my way through most of the coding to get my scoreboard the way I want except two items. The one I am asking here is how to add a jersey color using the color picker. I want to change the background color of an object beside the team name to be the color of the team's jersey, and because I dont know the color of the jersey until they show up at the field, I would like to use the color picker to do this. (I had considered using the palettes, but as I am limited for time, I dont want to mess around with changing out palettes just before game time.
Would someone have a code sample that shows how to apply the color picker color to an object in the page?
 

murray-johnson

New member
I have looked at this and tried various ways, and have not been able to get this to work. This is what I have in my JS sheet. Definitely a newb when it comes to coding HTML. I'm so close to getting this the way I want. Any thoughts as to what I am missing?
Code:
if ($('#Teams_1').text() != docData['Teams_1'] ||
    $('#Teams_2').text() != docData['Teams_2'] )
{
    $('body')
        .queue(elemHide('.scores')).delay(0)
        .queue(elemHide('.teams')).delay(0)
        .queue(elemUpdate()).delay(0)
        .queue(elemShow('.teams')).delay(0)
        .queue(elemShow('.scores'));
}
else if ($('#Teams_1s').text() != docData['Teams_1s'] ||
    $('#Teams_2s').text() != docData['Teams_2s'] )
{
    $('body')
        .queue(elemHide('.scores')).delay(0)
        .queue(elemUpdate()).delay(0)
        .queue(elemShow('.scores'));
}
$('#Jerseys_1').css('background-color', docData['Jerseys_1'])
$('#Jerseys_2').css('background-color', docData['Jerseys_2'])