Hello -
This is the code I used - it is the only code I have ever written in my life. The post you linked to helped me immensely.,
import wixData from “wix-data”;
$w.onReady(function () {
$w(“#repeater2”).onItemReady(($item, itemData, index) => {
$item("#button2").onMouseIn(() => {
$w("#mainimage").src = itemData.image;
$w("#mainimage").show();
});
// $item(“#button2”).onMouseOut(() => {
// $w(“#mainimage”).hide();
// });
});
wixData
.query(“testdata”)
.find()
.then((results) => {
if (results.items.length > 0) {
const items = results.items;
$w(“#repeater2”).data = items;
}
});
});
The database (dataset?) is connected to CMS, but this code runs the image change on mouseover.
I have a lot of other little thing I want to try to do, purely for the joy of learning. I am not a coder or web developer in way, just a guy who has an interest in how things work.