必须点击两次才能在移动设备上打开网站链接

2023-11-30前端开发问题
31

本文介绍了必须点击两次才能在移动设备上打开网站链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在运行一个 Wordpress 网站并且遇到了一个问题,我需要在移动设备上单击两次链接才能使链接真正起作用.我认为这可能是由于 :hover 在我的 CSS 中造成的,但是即使在删除它之后,我仍然需要在移动设备上单击该链接两次.

I'm running a Wordpress site and have run into an issue where I need to click a link twice on mobile in order for the link to actually work. I'm thinking this might be due to :hover within my CSS however even after removing it, I still need to click the link twice on mobile.

我所有的产品标题、图片和主页上的 CTA 按钮都会出现这种情况.

This is happening on all of my product titles, images, and CTA buttons on the homepage.

.product_item img:hover
.product_item p a:hover
.check_it_out:hover

谁能帮我确定如何解决这个问题?

Can anyone help me identify how to solve this?

有问题的网站是这个https://ecoshopr.com/

推荐答案

原来我的主题是使用了一些导致问题的 JS.一旦我从我的 init.js 文件中删除它:

Turns out my theme was using some JS that was causing the issue. Once I removed this from my init.js file:

/* button show */
        $/*('.product_item').mouseenter(function(){
                $(this).find('.product_button').fadeIn(100, function() {
                        // Animation complete.
                });
    }).mouseleave(function(){
                $(this).find('.product_button').fadeOut(100, function() {
                        // Animation complete.
                });
    });*/

问题已解决.

这篇关于必须点击两次才能在移动设备上打开网站链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

layui 实现实时刷新一个外部的div
主页面上显示了一个合计,在删除和增加的时候需要更改这个总套数的值: //html代码div class="layui-inline layui-show-xs-block" style="margin-left: 10px" id="sumDiv"spanSOP合计:/spanspan${totalNum}/spanspan套/span/div 于是在我们删除这个条数据后,...
2024-11-14 前端开发问题
156

layui 单选框、复选框、下拉菜单不显示问题如何解决?
1. 如果是ajax嵌套了 页面, 请确保 只有最外层的页面引入了layui.css 和 layui.js ,内层页面 切记不要再次引入 2. 具体代码如下 layui.use(['form', 'upload'], function(){ var form = layui.form; form.render(); // 加入这一句});...
2024-11-09 前端开发问题
313

layui tree树组件怎么自定义添加图标
经常用到layui的朋友都知道,layui tree默认是不能自定义图标的,那么我们要自定义的话要怎么操作呢? 首先用编辑器软件(修改时候用编辑器记得编码),打开layui.js。搜索: i class="layui-icon layui-icon-file" 改为如下代码: i class="'+ (i.icon || "l...
2024-10-26 前端开发问题
493

layui要如何改变时间日历布局大小?
问题描述 我想改变layui时间日历布局大小,这个要怎么操作呢? 解决办法 可以用css样式对时间日历进行重新布局,具体代码如下: !DOCTYPE htmlhtmlheadmeta charset="UTF-8"title/titlelink rel="stylesheet" href="../../layui/css/layui.css" /style#test-...
2024-10-24 前端开发问题
271

jQuery怎么动态向页面添加代码?
append() 方法在被选元素的结尾(仍然在内部)插入指定内容。 语法: $(selector).append( content ) var creatPrintList = function(data){ var innerHtml = ""; for(var i =0;i data.length;i++){ innerHtml +="li class='contentLi'"; innerHtml +="a href...
2024-10-18 前端开发问题
125

“数组中的每个孩子都应该有一个唯一的 key prop"仅在第一次呈现页面时
quot;Each child in an array should have a unique key propquot; only on first time render of page(“数组中的每个孩子都应该有一个唯一的 key prop仅在第一次呈现页面时)...
2024-04-20 前端开发问题
5