Hi everyone,
I have two images on a dynamic page and I want one to disappear when certain conditions on image width are met. My dataset is called #dyanmicDataset and the image is in a column with reference logo. I am new to coding and have no idea how to make this work. Image6 and Image5 are the placeholders that overlap and I want them to appear or disappear as needed. Right now it is saying logo cant be found on dynamicDataset although it is certainty in there. Thanks for the help!
import wixData from ‘wix-data’;
$w.onReady(() => {
if ($w(‘#dynamicDataset’).logo.logoWidth > 129) {
$w(‘#image6’).show();
$w(‘#image5’).hide();
} else {
$w(‘#image6’).hide();
$w(‘#image5’).show();
}
});