hi there
is there a way to enlarge an image when it’s clicked inside a repeater?
hi there
is there a way to enlarge an image when it’s clicked inside a repeater?
You can put 2 place holders in the repeater item. One for the normal image size and the other for the enlarged image.
Make the enlarged image collapsed on load.
when clicked do something like:
$w.onReady(() => {
$w('#repeaterSmallImage').onClick(event => {
$w('#repeater1').forEachItem(($i, iData) => {
if(iData._id === event.context.itemId){
$i('#repeaterSmallImage').collapse();
$i('#repeaterLargeImage').expand();
} else {
$i('#repeaterLargeImage').collapse();
$i('#repeaterSmallImage').expand();
}
})
})
})