• We just upgraded the platform on which this website runs! Please inform @Jaxel of any issues.

Implemented Color picker Type Variable

tsvaufderhoehe

New member
Great work, thank you!
Would you please explain, how to embed this in css? I would like to use the color as background of a div or span to show the jersey color next to the team name. Unfortunately I have not found how to simply include a variable in css. Thanks a lot!
 

Jaxel

Administrator
It is not possible to update CSS in real time... that's just not something browsers can do. You have to place the style information in inline HTML in this case.
 

Jaxel

Administrator
Assuming the field you want to update has class="jersey_1", you could do:

Code:
$('.jersey_1').css('background-color', docData['players_1s'])