01-16-2021 00:31
01-16-2021 00:31
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.
01-18-2021 05:33 - edited 01-18-2021 05:34
01-18-2021 05:33 - edited 01-18-2021 05:34
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
01-18-2021 05:33 - edited 01-18-2021 05:34
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