Hello , i would like some help on my code here ,
i have a repeater with images on my website page, that is connected to a database , i have been trying to connect the image src on the repeater with a variable,
and i have another images on the website, that i need to change automatically when page loads
what i am trying to do is write a condition that changes the images on the website ( not the one on the repeater) into another image, depending on the img src of the repeater images, only if the imageOnPage URL is the same as image URL ,i hope my explanation is clear.
here is my code so far :
let imageFromGallery = ‘img url’ // the image is from the media gallery
$w . onReady ( function () {
});
let image = $w ( ‘#repeaterImage’ ). src ;
if ( image === imageOnPage ){
$w ( '#imageOnPage' ). src = 'URL'
}
nothing happens when i try this code .