Conditional button from repeater

Hello,

I have a switch button inside a repeater.
I would like this switch to only show another button when it is toggled on and hide it when it is off. This switch is linked to a collection but i do not want the button to show based on the collection’s boolean value but based on the user’s switch
I’ve tried this code which is not working. It is making the button disappear but the toggle has no effect.

$w( “#repeater1” ).onItemReady

 { 

if ($w( “#switch1” ).checked) {
$w( “#button10” ).show()
} else {
$w( “#button10” ).hide()
}
}

Hi Scott,

First of all, you’re not specifying the scoop of the repeater, I suggest that you read more about repeaters and their scoop first, and be familiar with the code.

https://www.wix.com/corvid/reference/$w.Repeater.html

Hi Ahmad. I believe it is a Global Scope Selectors . I read everything that i could on the matter. I do not have a coding background and am just trying to get some help as after trying on my own for a while, I am not finding a solution.