Html 图像不可点击
我的网站上有新代码,我的部分图像图标无法点击。url显示,因此它正在读取a标记,但您无法单击图片。任何见解都会有所帮助 看看商店的样子 html布局为:Html 图像不可点击,html,image,anchor,Html,Image,Anchor,我的网站上有新代码,我的部分图像图标无法点击。url显示,因此它正在读取a标记,但您无法单击图片。任何见解都会有所帮助 看看商店的样子 html布局为: <ul class="box-content"> <li class="item first"> <div class="item-info"> <a href="http://staging.pinupgirlcloth
<ul class="box-content">
<li class="item first">
<div class="item-info">
<a href="http://staging.pinupgirlclothing.com/new-items/sp-15252-pk.html" class="product-image"><img src="http://staging.pinupgirlclothing.com/media/catalog/product/cache/1/small_image/115x150/9df78eab33525d08d6e5fb8d27136e95/s/p/sp-15252-pk_01t.jpg" width="115" height="150" alt="Floozy Kiss Lock Purse in Baby Pink Size- 939450" title="Floozy Kiss Lock Purse in Baby Pink Size- 939450" /></a>
</div>
</li>
<li class="item">
<div class="item-info">
<a href="http://staging.pinupgirlclothing.com/new-items/il-hs-bk.html" class="product-image"><img src="http://staging.pinupgirlclothing.com/media/catalog/product/cache/1/small_image/115x150/9df78eab33525d08d6e5fb8d27136e95/i/l/il-hs-bk_01.jpg" width="115" height="150" alt="Vintage Style Sheer Hair Scarf in Black Size- 952104" title="Vintage Style Sheer Hair Scarf in Black Size- 952104" /></a>
</div>
</li>
<li class="item last">
<div class="item-info">
<a href="http://staging.pinupgirlclothing.com/new-items/black-jelly-flats.html" class="product-image"><img src="http://staging.pinupgirlclothing.com/media/catalog/product/cache/1/small_image/115x150/9df78eab33525d08d6e5fb8d27136e95/f/i/fi-032jelly-bk_01_1.jpg" width="115" height="150" alt="Dragonfly Jelly Peeptoe Flats in Black" title="Dragonfly Jelly Peeptoe Flats in Black" /></a>
</div>
</li>
</ul>
-
-
-
main.js中的这段代码是您的问题。如果不希望阻止默认行为(链接后),请不要阻止默认行为:
$('.product-view a.product-image').on('click', function(e) {
e.preventDefault();
});
你的代码很好。问题必须在其他地方。我将您的代码复制到了一个jsFiddle here()中,它工作正常。请在之前更正您的javascript代码。你网站中的控制台显示了
未捕获的语法错误:输入的意外结束lush dress swan.html:1
和未捕获的TypeError:无法设置未定义原型的属性“不透明”。js:2754
也许代码中没有错误,这只是一个大的隐藏广告?不,看看他的网站,html还可以,前面没有iframe或其他容器。我想到了一个javascript问题,页面上的点击事件过载,阻止了链接被跟踪。我看到许多javascripts错误:尝试更正它们。这是zoomlens div。它的z索引为999,因此它从图像链接中窃取了焦点。我在我的页面上看到程序员正在使用锚标记中的class属性来控制页面上主图像中链接的点击。如果我从上面的标记中删除class=“product image”,这会解决问题吗?这会解决这个问题。我不能说它是否会创造其他人:)我能雇佣你来解决这个问题吗?你能通过GIThub工作吗?我们的开发者在我们身上消失了。它可能比这更复杂,因为我相信类是由类别图像和产品页面上的主图像调用的,所以它是不可点击的。也许这样做可以使缩放工具更加无缝地工作。我一定送你妻子一件衣服,这是公平交易。我将通过电子邮件向您发送git信息。我已将您添加到我们的github实例(7 square services-pinupgirl存储库),以便您可以下载代码并使用它。当您进行更改时,请告诉我,因为我们需要运行命令将更改推送到临时站点。