Hello Wix folks. You guys are blowing my mind with this code stuff!!!
I am wondering how to change/get #image1 to equal a #gallery1 image with the onItemClick event. So when you click on an image in #gallery1 it turns #image1 into the same picture. Looks like this is possible, but not quite sure how to piece it together. I need to take a JS code class now . But until then any help would be much appreciated.
Here is the link to the page:https://www.jakecorboy.com/GlazeData/FM-Satin
Here is the code I currently have for the page:
import wixData from ‘wix-data’;
$w.onReady( function () {
//TODO: write your page related code here…
});
let lastFilterfbaseglaze;
function filter (fbaseglaze) {
if (lastFilterfbaseglaze !== fbaseglaze) {
let newFilter = wixData.filter();
if (fbaseglaze)
newFilter = newFilter.contains(‘fbaseglaze’, fbaseglaze);
$w(‘#GlazeData’).setFilter(newFilter);
lastFilterfbaseglaze = fbaseglaze;
}
}
export function iGlazeDrop_change() {
$w(“#GlazeData”).setFilter(wixData.filter()
.contains(“fglazeinfo”, $w(“#iGlazeDrop”).value)
);
}
export function gallery1_itemClicked(event, $w) {
$w(‘#image1’) = $w(‘#gallery1’).onItemClicked.value;
}
^^^^^^^^^END CODE^^^^^^^^^
Just not sure how to talk with the gallery about getting it to do this
Thanks,
Jake