top of page
Lanre Olayiwola

Lanre Olayiwola

Image Swap on Hover in Editor X

Updated: Dec 29, 2023

In this post, you will learn how to swap images that display on your site when users hover over specified areas on the site. This is a pretty simple trick that does require a little bit of code.


Photos

Before you add the code, make sure you add the Event Handler "mouseIn" and delete the default comments that Wix adds.

$w('#imageX1').show('fade')
    .then (() => {
        $w('#imageX2').hide('fade');
        $w('#imageX3').hide('fade');

    })

Make sure to set "#imageX" to the ID of the images on your website. And if you do not want the images to fade in/out, remove the " 'fade' " parts of the code.


Have fun!

コメント


bottom of page