Home Forums WoodMart support forum Disable mobile hover

Disable mobile hover

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #34224

    Qwans
    Participant

    Hi guys,

    Is it possible trough css to disable the product hover (which shows add to cart for example) on mobile and make it with one click go to the product page?

    #34243

    Artem Temos
    Keymaster

    Hi,

    Try to add the following code snippet to the Custom JS area in Theme Settings to change this behavior

    if( jQuery(window).width() <= 1024 ) {
        jQuery('body').on('click', '.woodmart-hover-base', function( e ) {
            window.location = jQuery(this).find('.product-element-top > a').attr('href');
        });
    }

    Regards

    #34253

    Qwans
    Participant

    Hi Artem,

    Thank you for you reply.

    However the code is not resolving the problem.
    I get multiple errors on the custom JS sheet.

    Check my attached image for all the errors.

    #34257

    Artem Temos
    Keymaster

    Strange, but we don’t see the code added to your source code. Could you please provide us your admin access so we can check it?

    #34259

    Qwans
    Participant

    Sorry I deleted it when I checked if it worked.

    I just found the issue, I copied the code from the mail directly this was my fault.
    Now I copied the code from the code box above and it works.

    When I click on a product it takes me directly to the product page.
    But the only thing now is, when clicking on a product I still see the hover effect popping up, but it’s loading the new page at the same time and short after that it takes me to the product page.

    Is there a way to completely disable the hover effect on those products on mobile?

    #34263

    Artem Temos
    Keymaster

    Try to add the following code snippet to the Custom CSS area for mobile and tablet devices in Theme Settings to remove them

    div.woodmart-hover-base.hover-ready.state-hover, 
    div.woodmart-hover-base.hover-ready:hover {
       -webkit-transform: none;
       transform: none;
    }
    
    div.woodmart-hover-base .content-product-imagin,
    .woodmart-hover-base .fade-in-block {
        display:none;
    }
    #34284

    Qwans
    Participant

    Great thank you Artem this fixed my issue!

    Have a nice day!

    #34290

    Artem Temos
    Keymaster

    Great, you are welcome!

    #37796

    jalinmedia
    Participant

    We’ve copied this code also to our website. We’ve to click on the product twice before it opens.
    Could you help us out?

    #37805

    Artem Temos
    Keymaster

    Could you please describe your problem in more details and provide us some link where we can see the code added?

    #37808

    jalinmedia
    Participant

    Hi,

    We’ve added the code in : Custom CSS for tablet & Custom CSS for mobile in the theme settings.
    Please visit our website. The link is in the private content.

    #37812

    Artem Temos
    Keymaster

    Did you add JS code also?

    #37814

    jalinmedia
    Participant

    Yes!

    #37818

    Artem Temos
    Keymaster

    Try to put it to the custom JS on document ready event.

    #37820

    jalinmedia
    Participant

    It’s working thanks!

    #37821

    jalinmedia
    Participant

    Is it possible to display some custom text on the hover on desktop page?

    #37826

    Artem Temos
    Keymaster

    Sorry, but it requires more customization of PHP and CSS template files and we don’t have a quick tip for this.

    #37827

    jalinmedia
    Participant

    Ok thanks!

Viewing 18 posts - 1 through 18 (of 18 total)

The topic ‘Disable mobile hover’ is closed to new replies.