Alberto da Silva
Posts: 0
Joined: Thu Jan 26, 2012 12:38 am

How do I change background color of a group button located on the Navbar at the top of the screen?

I added a group button at the Navbar and I would like to change the background color of the individual buttons if local storage values are empty.

I'm having difficulting in getting the proper javascript code to change the button color. Can anyone point me in the right direction.

Sincerely,

Alberto da Silva
Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How do I change background color of a group button located on the Navbar at the top of the screen?

Hello Alberto,

Please use CSS below for setting myGroupedbuttons' background color=red:

pre[name="myGroupedbuttons"] a {
background:red!important;
}/pre

Alberto da Silva
Posts: 0
Joined: Thu Jan 26, 2012 12:38 am

How do I change background color of a group button located on the Navbar at the top of the screen?

Hi Sergiy,

Thanks for the reply. In my case, I do not want to change the background color of the whole group buttons as one, but each individual button if a certain criteria is met. As an example, I have three buttons called A, B and C and three local storage values called VarA, VarB and VarC.

What I would like to do is if VarA is empty then change background color of button A, if VarB is empty then change background color of button B, same thing for button C.

What would be the best way to accomplish this? I'm thinking through JavaScript, if so, what would I use to change background color of the button using JavaScript?

Can I call a CSS thorough Javascript?

Sincerely,

Alberto da Silva

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How do I change background color of a group button located on the Navbar at the top of the screen?

Hello Alberto,

We are sorry, but unfortunately custom app logic (css and js) are outside the scope of standard Appery.io platform support. You may consider purchasing Advisory Pack to get more in-depth help on this question. Here is more information about it: http://appery.io/services/#Advisory_Pack.
And yes, you can call css via JS, you may search this info on the forum, for example here: https://getsatisfaction.com/apperyio/...

Return to “Issues”