我无法在Google Chrome浏览器中将商品添加到购物车中。
这是输入:
<input type="submit" value="Add to Cart" class="Cart66ButtonPrimary purAddToCart" name="addToCart_68" id="addToCart_68" disabled="disabled">
有人能想到这个的原因吗?可能是禁用=&#34;禁用功能&#34;
我尝试将此添加到我的header.php但没有运气:(
<script type="text/javascript">
jQuery(document).ready(function(){
$(function() {
$(".Cart66ButtonPrimary").click(function(){
$("input").removeAttr("disabled");
return(true);
});
});
</script>
答案 0 :(得分:1)
尝试将代码包装在DOM就绪处理程序中,因为您将jQuery代码放在页面的<head>
部分中:
$(function() {
$(".Cart66ButtonPrimary").click(function(){
$("input:text").removeAttr("disabled");
return(true);
});
});