Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Toggle Page Color

Rishi Dec 14, 2018 05:07PM CET

Hello! Is there a way to create a button that toggles the background color of a page? I'd like to change a white page to a black page using a button. I I know that you can change the page color using the "Branding" section but I would like visitors the option to change the page color themselves (for reading at night). Is this possible?

Up 0 rated Down
Jon Dec 14, 2018 10:10PM CET Semplicelabs Agent

Hey Rishi!

Unfortunately, we can’t assist with custom code support for something like this since it’s not native to Semplice, and unfortunately we’re too small of a team to offer customized support (we’re a small crew!)

That being said, you may be able to use some simple jQuery to set a click event on a Semplice button or link, and then change the ‘body’ (or any section of your page with a custom class in your Section Styles) background color. You can follow this link for example code:

I’m sorry I can’t assist beyond this, but hope it helps.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found