Using the Color Picker to change panel/div background
Hi all,
I would like to use the color picker to change the background color of a asp:Panel or a div (either can be used), this is so the user can change the background colour of some content.
Any idea how I could about this? I thought retrieving the field value in the Page_Init event and setting the BackColor in there?
Personally I would use JQuery (either the color or animate plugin?) to set the color, then you can just us a macro to write out the jQuery script which includes the color from the picker.
Using the Color Picker to change panel/div background
Hi all,
I would like to use the color picker to change the background color of a asp:Panel or a div (either can be used), this is so the user can change the background colour of some content.
Any idea how I could about this? I thought retrieving the field value in the Page_Init event and setting the BackColor in there?
Thanks.
Personally I would use JQuery (either the color or animate plugin?) to set the color, then you can just us a macro to write out the jQuery script which includes the color from the picker.
Rich
Ok, could you provide a small example? I've never used jQuery to write out a macro?
Actually you wouldn't need JQuery at all if you were only setting the color when the page loads.
Something like the below should work.
Thanks for setting me in the right direction:
is working on a reply...