Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Avada › Forums › Community Forum › Change text and icon of button onClick
I want to create a dark theme website for nightly visitors. For this I want to add a button to my Menu.
The button needs to change between “Day [sun icon]” and “Night [Moon icon]” When clicked. How do I create this?
Got all the JS and CSS finally..now the smallest but seemingly most difficult part…changing a button text!
Hey @gandalf,
That’s cool.
Just throwing this out here. There are a few examples of day/night mode toggles. I grabbed one that uses pure HTML and CSS and stuck it into the Avada header.
Here’s what that looks like.
https://www.loom.com/share/70a43fa1b40543b6a6c4479567da9024
If you’re interested, I can post all the code up here or on GitHub.
Cheers!