12-22-2019 13:55
12-22-2019 13:55
Hi! I have created a tile-list and now i want to click item1 and for example it will show my daily steps.Have anyone any idea of how can i connect my list and click the item1?
//index.gui
<use id="my-list" href="#tile-list">
<use href="#my-tile-item" class="tile-list-item">
<set href="text" attributeName="text-buffer" to="Steps" />
</use>
//index.js
let list = document.getElementById("my-list");
let items = list.getElementsByClassName("tile-list-item");
items.forEach((element, index) => {
let touch = element.getElementById("touch-me");
touch.onclick = (evt) => {
console.log(`touched: ${index}`);
}
});
12-22-2019 16:41
12-22-2019 16:41
Wondering why you deleted your account before someone could help you out. I can't help you, but you posted in the area where the smart tech developer types reside. Sorry you couldn't wait - it's been three hours and it's a weekend. You won't get notice if anyone does post here, since you deleted your account.