Page 1 of 1

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

Posted: Fri Jun 12, 2015 3:38 am
by Alberto da Silva

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


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

Posted: Fri Jun 12, 2015 12:32 pm
by Serhii Kulibaba

Hello Alberto,

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

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


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

Posted: Fri Jun 12, 2015 1:09 pm
by Alberto da Silva

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


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

Posted: Fri Jun 12, 2015 4:25 pm
by Evgene Karachevtsev

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/...