I am new to wix and have been following some tutorials. I have run into an issue where .getCurrentItem gets the first item instead of the item from the repeater that I click. I am trying to have a button that downloads the associated image, but it always downloads the first one. Any help is appreciated.
Here is the code:
$w.onReady(function () {
$w('#button19').target = "_blank";
$w('#button19').onMouseIn( (event) => {
let item = $w('#dataset1').getCurrentItem();
let picture = item.image;
let url = picture.split("/")[3];
let filename = item.fileName;
$w('#button19').link = `https://static.wixstatic.com/media/${url}?dn=${filename}`;
} );