COLUMN BACKGROUND IMAGES

This tutorial shows the basics of adding scripts to your page:
https://www.wix.com/alpha/resources#!add-interactions/pvoe0

for your specific case, what you need to do:

  • select your dataset in your dynamic page
  • open the properties panel (tools ==> properties panel)
  • hover over “onCurrentIndexChanged” in the events list
  • click the ‘+’ sign to create an event handler. this is where you will write your image-setting logic.
    this event is called by the wixcode runtime whenever the “active record” in the dataset changes.
    you can read about it more in the API reference.
  • write the code that changes the background image by accessing the image URL from the active record in the dataset and setting it into the background property of the column component.
    your code should look similar to:
  1. let image_url = $w(“#myDataset”).getCurrentItem().myImageURL; //assuming you store image URLs in a field called my image URL .
  2. $w.(“#myColumn”).background.src = image_url;

hope this helps…