- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有第一个弹出窗口,另一个弹出窗口来选择几个字段。要显示第二个弹出窗口,这是我正在尝试的代码:
$("#select1").click(function(e) {
e.stopPropagation();
//$('#sellerModal').hide();
var tmplData = {
string:['Ready','2-3 Days','4-5 Days','1 Week','10+ Days']
};
$("#countTypePopupTemplate").tmpl(tmplData).appendTo(".maindiv");
that.closePopup();
$("#count_div").each(function() {
$("#count_div").click(function(evt) {
evt.stopPropagation();
$("#select1").text($(this).text());
$("#myCounttype").remove();
});
});
});
这是 HTML 模板:
<script id="countTypePopupTemplate" type="text/x-jquery-tmpl">
<div id="myCounttype" class="popup1 layer-2">
<div class="popup5">
{{each string}}
<div id="count_div" class="popup4 bottom-border">${$value}</div>
{{/each}}
</div>
</div>
</script>
我收到警告:
Ignored attempt to cancel a touchstart event with cancelable=false, for example, because scrolling is in progress and cannot be interrupted. fastclick.js
在这里,我无法在第二个弹出窗口中单击 5 个元素中的 4 个。只有第一个是可点击的。第二个弹出窗口的快照。
我阅读了所有讨论该主题的博客。但是没有任何解决方案适合我。看起来有一些极端情况。
最佳答案
尝试在 $("#count_div").each(function() {
像这样
$("#count_div").click(函数(evt) {$(".parent_class #count_div").each(function() {
$(".parent_class #count_div").click(函数(evt) {
这将解决为 "#count_div"
运行 1 次 each()
的问题。
所以实际的问题是 each()
只运行了一次,这就是为什么你的第一个 Ready
click 事件有效的原因,而不是其他的。
关于javascript - 忽略取消触摸启动的尝试 : fastclick warning,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41457630/
我正在使用 FastClick与 FastClick.d.ts . TSC 正在使用 module: "commonjs" 并且我正在与 Webpack 捆绑在一起。我不知道如何引用 FastClic
我有第一个弹出窗口,另一个弹出窗口来选择几个字段。要显示第二个弹出窗口,这是我正在尝试的代码: $("#select1").click(function(e) { e.stopPropagatio
我遇到的问题是,当我通过点击网站上的一些按钮来测试 300 毫秒的延迟时,我发现没有延迟。但是当我加载应用程序太 phonegap 时,然后我触摸平板电脑上的按钮,我直接注意到 300 毫秒的延迟。所
初始化 fastclick 插件时遇到问题 正在尝试使用 class 初始化 fastclick 插件,但它给了我错误如果我将它用于单个元素,它工作正常,但如果我想将它用于多个元素,则通过错误 对于单
我将 requirejs 与 fastclick 结合使用。我收到以下错误: Uncaught TypeError: Cannot set property 'trackingClick' of un
我正在使用 Famo.us 的 Fastclick,要求它出现在我的一个主要 View 的顶部,如下所示: var FastClick = require('famous/inputs/FastCl
我在包含 FastClick 时遇到了麻烦在我的项目中。一切正常,移动设备上的 300 毫秒延迟丢失,但以编程方式触发 click() 事件现在在移动设备上不起作用。 最佳答案 它在文档中说了这一点(
我最近集成了fastclick.js进入我的项目,以消除物理点击触摸屏设备上的链接之一时出现的 300 毫秒延迟。现在我想测试它以确保它正确集成。如果正确集成,我应该能够对 300 毫秒的速度差异进行
我想看看我是否正确使用了 fastclick.js。我真的无法判断它是否更快。这是我的代码: window.addEventListener('load', function() {
使用 AngularJS 在 iPad 上单击 ng-click 时会出现延迟 我有需要编写的生成指令 my_app.directive 'touch', -> (scope, e, attr)
如果我使用 ZURB 的 Foundation 创建一个响应式网站,我是否需要包含一个像 Fastclick(由 FTLabs 提供)这样的库,以避免 300 毫秒的点击延迟触摸设备? 似乎库应该包括
如果我使用 ZURB 的 Foundation 创建一个响应式网站,我是否需要包含一个像 Fastclick(由 FTLabs 提供)这样的库,以避免 300 毫秒的点击延迟触摸设备? 似乎库应该包括
我正在将 Fastclick 与 jQuery Mobile 一起使用,除了一些非 native 选择现在需要两次点击(而不是双击)才能激活之外,它一切正常。 在附加 Fastclick 之前,我将“
FastClick库增强了对 JavaScript onClick 的响应能力在 Webkit 下使用时的事件,但它会提高普通超链接的响应能力吗? (例如
我正在尝试添加 FastClick到一个已经使用 Chosen 的网站用于选择的 jQuery 插件。使用 FastClick,选择框可以简单地停止响应移动浏览器上的点击。这也可以通过 Chrome
我正在构建一个 Cordova 应用程序,点击响应时间很慢。 我found angular-touch Angular 的插件(虽然它是为 Angular 1.2.0 设计的,但看起来它可能适用于旧版
我正在使用 FastClick在具有大链接的页面上,因为我想绕过移动浏览器中点击的 300 毫秒延迟。我为链接的 :active 状态设置了“突出显示”样式,并且由于 FastClick,它可以快速正
将 Dart Polymer 的纸元素与 Angular 2 一起使用时,如何消除 iOS 设备上约 300 毫秒的点击延迟? 例如在 Angular 2 组件中,如果我有一个包含 paper-but
我有一个 ember-cli 项目。我已经使用 bower 安装 fastclick 并将其添加到我的 brocfile。 现在我正在尝试初始化它。在我的 app.js 文件中,我添加了: impor
我正在使用fastclick使用我的 Bootstrap 3 响应式网站来加快移动设备上的响应时间。一般来说,这工作得很好,没有任何问题。然而,经过多次测试,我发现这会破坏 iPhone 上的引导单选
我是一名优秀的程序员,十分优秀!