I have a list of commonly used hex colors that I would like to list under my jPicker related input text box, and I would like to figure out how to change the value of the active jPicker color without opening the jPicker color picker palette.
I managed to create a function that updates the input field associated with jPicker, but the background colors and picker.gif are not updated. I would like to make the background colors update as if the color was selected from jPicker itself.
Here is my code for the activation link ...
<span onclick=doColor(1,'cc9900')>cc9900</span>
And here is the js handler
function doColor(el, color)
{
if(el){$('#theme_header_color').attr('value', color);}
else{$('#theme_sidebar_color').attr('value', color);}
}
source
share