Home › Forums › WoodMart support forum › Disable mobile hover
Disable mobile hover
- This topic has 17 replies, 3 voices, and was last updated 6 years, 11 months ago by jalinmedia.
-
AuthorPosts
-
January 19, 2018 at 12:29 pm #34224
QwansParticipantHi 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?
January 19, 2018 at 1:09 pm #34243
Artem TemosKeymasterHi,
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
January 19, 2018 at 1:52 pm #34253
QwansParticipantHi 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.
January 19, 2018 at 2:32 pm #34257
Artem TemosKeymasterStrange, 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?
January 19, 2018 at 2:38 pm #34259
QwansParticipantSorry 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?
January 19, 2018 at 2:48 pm #34263
Artem TemosKeymasterTry 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; }
January 19, 2018 at 3:12 pm #34284
QwansParticipantGreat thank you Artem this fixed my issue!
Have a nice day!
January 19, 2018 at 3:25 pm #34290
Artem TemosKeymasterGreat, you are welcome!
February 6, 2018 at 12:51 pm #37796
jalinmediaParticipantWe’ve copied this code also to our website. We’ve to click on the product twice before it opens.
Could you help us out?February 6, 2018 at 1:37 pm #37805
Artem TemosKeymasterCould you please describe your problem in more details and provide us some link where we can see the code added?
February 6, 2018 at 1:40 pm #37808
jalinmediaParticipantHi,
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.February 6, 2018 at 1:54 pm #37812
Artem TemosKeymasterDid you add JS code also?
February 6, 2018 at 2:00 pm #37814
jalinmediaParticipantYes!
February 6, 2018 at 2:51 pm #37818
Artem TemosKeymasterTry to put it to the custom JS on document ready event.
February 6, 2018 at 2:58 pm #37820
jalinmediaParticipantIt’s working thanks!
February 6, 2018 at 2:59 pm #37821
jalinmediaParticipantIs it possible to display some custom text on the hover on desktop page?
February 6, 2018 at 3:05 pm #37826
Artem TemosKeymasterSorry, but it requires more customization of PHP and CSS template files and we don’t have a quick tip for this.
February 6, 2018 at 3:12 pm #37827
jalinmediaParticipantOk thanks!
-
AuthorPosts
The topic ‘Disable mobile hover’ is closed to new replies.
- You must be logged in to create new topics. Login / Register