I need a Javascript function that sifts through CSS gradients of a specific class and format and sets two jsColor boxes (see [login to view URL]) to the colors of the gradient.
We have absolute control of the input CSS. Example follows:
#[login to view URL]{
background-color: #0074AA;
background: -moz-linear-gradient(top, #0074AA 0%, #CEDFF3 100%);
background: -webkit-linear-gradient(top, #0074AA 0%,#CEDFF3 100%);
background: -o-linear-gradient(top, #0074AA 0%,#CEDFF3 100%);
background: -ms-linear-gradient(top, #0074AA 0%,#CEDFF3 100%);
background: linear-gradient(to bottom, #0074AA 0%,#CEDFF3 100%);
filter: progid:[login to view URL]( startColorstr='#0074AA', endColorstr='#CEDFF3',GradientType=0 );
color: #ffffff;
}
From this example, it should grab the two jsColor boxes by ID (we can call them jscolor1 and jscolor2) and set jscolor1 to the color #0074AA and jscolor2 to a color of #CEDFF3.
Finished project must use jQuery and its selectors when available.
$('element') is acceptable; [login to view URL] is not.