Dynamically change background color for menu on UI

0
Hi Team,   Is it possible to change the color of menu bar on UI dynamically based on environment?
asked
2 answers
4

You can also solve this with simple JavaScript code inside a HTML snippet in your main layout page.

Something like:

var url = $(location).attr('href');
if(document.URL.indexOf("localhost") != -1) 
{$("div.Bar").css( 'background-color','#ffffff');} 

else if(document.URL.indexOf("test") != -1)
{$("div.Bar").css( 'background-color','#eeeeee');} 

else if(document.URL.indexOf("accp") != -1)
{$("div.Bar").css( 'background-color','#dddddd');}

Will do the trick.. It checks the URL of your window and based on parts of the URL (localhost, text, accp) it will set the background.

answered
0

Swathi,

You can accomplish this with the StyleSheetSwitcher widget from the App Store.

Mike

 

EDIT:  Just noticed you are on 4.7.1.  This widget works from 5.19 forward, so you'll have to upgrade your app to use it.

answered