我有这个HTML代码段:
<a href="picture-big.jpg">
<span>
<img src="picture-small.jpg">
<input type="checkbox" name="delete">
</san>
</a>
Run Code Online (Sandbox Code Playgroud)
和JS部分:
$('input').click(function(e) {
e.stopPropagation();
});
Run Code Online (Sandbox Code Playgroud)
在Mozilla上,当我点击复选框时,它会停止传播,但仍会转到该锚点(picture-big.jpg).
如果我使用return false或e.preventDefault()(并使用jQuery检查复选框($('input').prop('checked',true);)它不检查输入.
想法是选中复选框而不跟随链接.在Chrome和IE上,它正在运行.但不是Mozilla.
有任何想法吗?
我正在尝试构建嵌入式私有应用程序和我缺少的东西.正如这里所说,我创建了App,获得了API密钥.然后是一个非常简单的内容页面:
<head>
<script src="https://cdn.shopify.com/s/assets/external/app.js"></script>
<script type="text/javascript">
ShopifyApp.init({
apiKey: 'my-private-api-key',
shopOrigin: 'https://my-dev-shop.myshopify.com',
debug: true
});
</script>
</head>
<body>
Private app
</body>
Run Code Online (Sandbox Code Playgroud)
我将通过访问此页面重定向到我的商店与屏幕.
The page you're looking for can't be found.
Try a search instead.
Run Code Online (Sandbox Code Playgroud)
重定向网址是
https://my-dev-shop.myshopify.com/admin/apps/my-private-api-key/
Run Code Online (Sandbox Code Playgroud)
我错过了什么?这是我第一次体验shopify,所以也许我错过了所有理解EASDK的工作方式.我使用SSL从localhost和我的域测试了它.谢谢你的任何提示.