Robin van Oeveren
Posts: 0
Joined: Wed Sep 25, 2013 3:45 pm

Changing background colour in mobile container

In the app I am currently developing, the background colour of the (body of the) mobile container is set using the properties defined in the theme jqm-Progress, swatch B.
I want this colour to be changed to white.
How can I do that?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Changing background colour in mobile container

Hi Robin!

On Load event Run JS with the following code:
preAppery("mobilecontainer1").css('background-color','white');/pre

simon saunders
Posts: 0
Joined: Tue Jun 24, 2014 2:14 pm

Changing background colour in mobile container

i changed this to a hex colour and it didnt work? any ideas?

Appery("mobilecontainer1").css('background-color','#589896');

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Changing background colour in mobile container

Hi,

Should work, did you replace mobilecontainer1 with your container name?

You can also try :

pre
$('div[dsid="mobilecontainer1"]').css('background','#589896');/pre

You can find more options here http://devcenter.appery.io/documentat...

simon saunders
Posts: 0
Joined: Tue Jun 24, 2014 2:14 pm

Changing background colour in mobile container

hi alena, thanks for fast response, very impressed. just upgraded from free plan and i love appery.

container name was wrong.

btw - how do i center a component using javascript?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Changing background colour in mobile container

Do you mean on the page? Components are centered automatically within the page.

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

Changing background colour in mobile container

Hello Simon,

Use this code to the event page show :

codecarousel = $('[name=mobilecarousel_7]');
carousel.on("ready", function(e) {
Appery("mobilecarousel_7").carouselRoot.carousel("to",2);
});/code

where mobilecarousel_7 is the name of your carousel

shabeer
Posts: 0
Joined: Thu Mar 12, 2015 2:46 pm

Changing background colour in mobile container

Hi, is it possible to change the background image of a mobile container using java script?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Changing background colour in mobile container

Hi -

Please take a look in our documentation section here -- https://devcenter.appery.io/documenta...

Return to “Issues”