Basically I want each one to move as I hover. I have the functionality but would like a cleaner way to feed in the currently hovered image and animate it without having to create a event for each element.
import wixAnimations from 'wix-animations';
import { timeline } from 'wix-animations';
let selected = $w("#image2 , #image3, #image4 , #image5, #image6 , #image7, #image8 , #image9, #image10 , #image11, Wood");
$w.onReady(function () {
// Write your JavaScript here
$w("#image2").onMouseIn((event) => {
const move = { y: -60, duration: 600, easing: 'easeOutCirc' };
timeline()
.add($w(("#image2")), move)
.play()
});
$w("#image2").onMouseOut((event) => {
const move = { y: 0, duration: 600, easing: 'easeOutCirc' };
timeline()
.add($w(("#image2")), move)
.play()
});
// To select an element by ID use: $w("#elementID")
// Click "Preview" to run your code
});