01-16-2021 00:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-16-2021 00:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
HI, I have managed to put the buttons onto the clock face & get a console log when the button is clicked, with an event listener.
Is there any way to make the text appear and then be replaced when another button is clicked?
Answered! Go to the Best Answer.
Accepted Solutions
01-18-2021 05:33 - edited 01-18-2021 05:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-18-2021 05:33 - edited 01-18-2021 05:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Something like this:
<svg>
<text id="demo" style="display:none">Hello!</text>
</svg>
import document from "document";
let demo = document.getElementById("demo");
// do this in the click event
demo.text = "Hello World!";
demo.style.display = "inline";
https://dev.fitbit.com/build/guides/user-interface/javascript/
https://dev.fitbit.com/build/guides/user-interface/javascript/#click-event

01-18-2021 05:33 - edited 01-18-2021 05:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-18-2021 05:33 - edited 01-18-2021 05:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Something like this:
<svg>
<text id="demo" style="display:none">Hello!</text>
</svg>
import document from "document";
let demo = document.getElementById("demo");
// do this in the click event
demo.text = "Hello World!";
demo.style.display = "inline";
https://dev.fitbit.com/build/guides/user-interface/javascript/
https://dev.fitbit.com/build/guides/user-interface/javascript/#click-event

