Hi all,
Hope you are well. We have a customer request where they want to change the background colour for the banner and main section of a visual perspective based on a user's selection. We added a "colour picker" to the system settings and tried to refer to it in the visual perspective CSS as "background-color: <<SystemSettings.colour>>".
After inspecting the css on runtime we can see it just injects the full string as the class instead of resolving the attribute.
Has anyone done this before? Will appreciate any help or direction.
All the best.
Karel
Changing a visual perspectives background colour dynamically
Re: Changing a visual perspectives background colour dynamically
I haven´t done this but you could use a class name for each frame e.g banner, background etc. and then use jQuery to change or add a CSS attribute to the class. I have done other similar things and as this is a dynamic thing you would also have to have some function that runs when displaying the frame to set (re-set) the CSS attribute.
Code: Select all
$( ".frameClass" ).css( "background", "red" );
Henrik (V8 Developer Ed. - Windows)