Modify Shop Select Block - Change Image on Button Hover

3 replies · opened Jun 3, 2021

SsuppenhuhnJun 3, 2021

Hi!
I'm trying to change the Product-Image from your block-shop-select template on button hover.

I've already made it do change the Product Decriptions on hovering the buttons modifying the script:


        $(document).ready(function () {
            $('.earpods-colors .nav-link').on('mouseover', function (e) {
                let data = $(this).attr("data-desc");
                $('.item-name').html(data);
            })
        });
    

But i'm pretty lost changing the rest - do you have any tips to do that?

Thanks in advance :)

SSemicolon WebSTAFFJun 5, 2021

Hello,

You can consider using something like this:
[ch_pre]
$(document).ready(function () {
$('.earpods-colors .nav-link').on('mouseover', function (e) {
let data = $(this).attr("data-desc");
$('.item-name').html(data);

        let image = $(this).attr("data-src");
		$( '.tab-pane img' ).attr( 'src', image );
    });
});

[/ch_pre]

However, you will need to update these codes manually as Customization Support is not currently provided.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

SsuppenhuhnJun 6, 2021

Thank you very much - helps so much!

SSemicolon WebSTAFFJun 6, 2021

Very Happy to Help! :)

Do let us know if we can help you with anything else.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard