Hi, am looking to change the strip background image based on the what is chosen in a dropdown menu.
For example. I have created a drop down menu for “Type of holiday”. So when a person selects for example SAFARI, I would like the background strip to change to a SAFARI image and so on.
I have three drop down menus on one page but only wish for the background image to change when someone picks items from the first dropdown
I have been trying for a while and also checking on the community forums with no luck. Hope you can help.
Thanks
You need to write an onChange function for your dropdown that will check which dropdown option is currently chosen and change the background.src of a strip accordingly. Here is an example of what it will look like with one dropdown option:
export function dropdown1_change(event) {
if ($w("#dropdown1").selectedIndex === 0) {
$w("#columnStrip1").background.src = 'wix:image://v1/a3ad2b_c95b12a4a01f4fc6953e0dd7853d6afc~mv2.png/musautiyui.png#originWidth=383&originHeight=405'
}
}
Insert URL of a preferred image from you Media Manager. To retrieve an image URL please follow these instructions: Wix Editor: Retrieving the URL of an Image | Help Center | Wix.com
More information in the following references:
Wow!!. Many thanks Angelina. This works for me and was able to add the other drop down options. Greatly appreciate your help!!
Clicking a strip, drops down another strip of elements
in Coding with Velo
Hi, I am looking to maximize a strip or open another strip with elements when I click a drop-down or down-arrow-icon or something like that.
For example. If my parent strip has a text called “Skills” and When I Click the drop down, a parent strip below it should open with more elements such as the skills (Eg, HTML, PHP, CSS ) and the parent should remain hidden until somebody clicks the drop down or any icon
I have been trying for a while and also checking on the community forums with no luck. Hope you can help.
Thanks