[英]Double click with jquery?
Is this possible, to do double click when user clicks 1 time? 用户单击1次时可以双击吗?
$(document).ready(function() {
$(".colors-fake a").click(function(e) {
e.preventDefault();
$(this).closest('.catalog-inner').find('a.active').removeClass("active");
$(this).addClass("active");
var index = $(this).index();
$(this).closest('.catalog-inner').find('.colors a').eq(index).click();
});
});
Have this code, and I want to do double click when there is a single click on .colors-fake a
. 有此代码,当我单击
.colors-fake a
时,我想双击。
Yes, simply trigger it like 是的,只需触发即可
$('myElement').trigger('dblclick');
or 要么
$('myElement').dblclick();
See dblclick() 参见dblclick()
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.