Avada Forums Community Forum Change text and icon of button onClick

Tagged: , , , ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Gandalf
    Participant
    Post count: 9

    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!

    marklchaves
    Participant
    Post count: 873

    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!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.