Hover animation.

Hi everyone.
I want to create a hover button. So when you hover over the image(hover box) it shakes. Currently that is not supported on the preset animations and I have to make my own. I know how to do mouse in and mouse out on velo However it takes long as I do it for each container. I am wondering if there is a way to create a function with two values( the regular container and the animation container) and just call the function back. Thank you so much.

Yes.
You can create an array of the containers.
And do something like:

containers.forEach(container => {
container.onMouseIn(event => {
const currentContainerId = event.target.id; 
//and do whatever you wish with $w("#" + currentContainerId) or its children
})
})

Thank you. Where will I put the .onMouseOut?

containers.forEach(container => {
container.onMouseIn(event => {
const currentContainerId = event.target.id; 
//and do whatever you wish with $w("#" + currentContainerId) or its children
})
container.onMouseOut(event => {
const currentContainerId = event.target.id; 
//and do whatever you wish with $w("#" + currentContainerId) or its children
})
})