Solution for object toggle using automatic/calculated intervals

Thanks a lot Mustafa, this works perfectly! One more question you might be able to help -

Is there a solution in Wix for receiving messages from another site/domain? My use case is -

I need to show or hide logos/images in Wix, however based on matching values of a variable inside a html/js hosted in another domain, for which I’m using the post method. The values in the variable is programmed to change, which is basically the location of many offices, which is displayed one by one on a spinning globe. So when the globe spins to a certain office or the variable includes a certain value, this needs to be passed on to the wix page where the matching company logos will be displayed.

Normally I would use .addEventListener to receive the cross-domain messages and make this work. Any ideas on if this would be possible?

Thanks!!!