Hello
I have a dynamic page with a single repeater that has worked perfectly with fitMode implementing fixedWidth function.
However, when I add 2 more repeaters with 2 more dataset instances to my page and update the code according to how I think it should be the fitMode fails to work fully on the Live site, but does display correctly in preview.
See my code below; where #set1, #set2, #set3 are the datasets, ‘#rep1, #rep2, #rep3’ the repeaters and #image, #image1, #image2 are the image items I wish to control with fitMode fixedWidth.
$w . onReady ( function () {
let mode = $w ( “#image, #image1, #image2” ). fitMode ;
$w ( “#set1, #set2, #set3” ). onReady ( () => {
$w ( ‘#rep1, #rep2, #rep3’ ). onItemReady (( $item , itemData ) => {
$item ( ‘#image, #image1, #image2’ ). fitMode = “fixedWidth” ;
})
});
console . log ( "Mode of the image is: " + mode )
});
If someone could point out any glaringly obvious mistakes in the code that’d be great.
Chris