Event handler bug

I’m relatively new at coding, but I’m building a website and want to add some simple event handlers to make a button show when the mouse hovers over an image. I’ve copied the code from the event handler tutorial $ w (" # button4 ").show() and it won’t work in my preview. I don’t really have enough experience to debug what’s going on and I’m wondering if y’all can help! Thanks!!!

Post your code so that we can see what you’re trying to do.

export function button4_mouseIn(event, $w) {
//Add your code for this event here:

You need a mouseIn event handler for the image , not for the button . In that event handler, you then show() the button. You want something like this:

export function image1_mouseIn(event, $w) {

Thank you!!

1 Like