我一直试图在这个依赖于mousemove的jquery css动画上加上10秒的延迟。我之前尝试过无效地使用.delay和.setInterval:
Worksheets(" Branded").Range("C3").Formula = "=COUNTIFS(" & r.Address(ReferenceStyle:=xlR1C1) & ",RC2, " & r2.Address(ReferenceStyle:=xlR1C1) & ",R2C)"
For Y = 1 To Column_Limit1 - 1
Range("C3").Offset(0, Y).Formula = "=COUNTIFS(" & r.Address(ReferenceStyle:=xlR1C1) & ",RC2, " & r2.Address(ReferenceStyle:=xlR1C1) & ",R2C)"
For X = 1 To Row_Limit1 - 1
Range("C3").Offset(X, 0).Formula = "=COUNTIFS(" & r.Address(ReferenceStyle:=xlR1C1) & ",RC2, " & r2.Address(ReferenceStyle:=xlR1C1) & ",R2C)"
Next X
Next Y
然而,他们似乎并不适合我。我可能把它放在错误的地方。我在下面列出了一个带有代码的jsfiddle链接。如果有人可以帮助我,那将是惊人的。
JSFiddle:https://jsfiddle.net/oekhedr/eeh950b7/39/#&togetherjs=4Bsp9CVtlB
非常感谢
答案 0 :(得分:0)
您可以在mousemove事件中添加(纯JavaScript)setTimeout,如下所示:
setTimeout(function() {
// do something here, but it will only start after 10 seconds have passed
},10000);
.delay()
仅适用于某些jQuery效果。以下是使用您的代码的小提琴:https://jsfiddle.net/eeh950b7/42/