I am trying to hide or show a button in a repeater. This is not working. Button appear in all or none. How to have it only in repeater that matches the condition. Thanks
$w.onReady( function () {
$w(“#dataset1”).onReady(() => {
$w(“#repeater2”).forEachItem(($item, itemData, index) => {
// console.log($item(“#text24”).text +“: " + $item(”#text24").text.toString().includes(“sponsor”) );
if ($item(“#text24”).text.toString().includes(“sponsor”)) {
$item(“#container4”).background.src = “wix:image://v1/0a7cf4_50add97aba4d47dcbdd0eaacb328e899~mv2.png/border-with-yellow-flowers-pv.png#originWidth=958&originHeight=487”
$w(‘#button1’).show();
} **else** {
$w('#button1').hide();
}
});
});
});