是否有可能在这些情况下触发的输入上定义事件。jquery定义自己的事件?
a) is called on blur of input IF the remaining conditions are true b) if the autocomplete list is visible halt the event until it is closed c) if the autocomplete list closes without an item being selected then the event is fired d) if the autocomplete list closes with an item being selected the event is not fired e) if the reason the blur was caused was because an item in the autocomplete was clicked the event is not fired
正如你所看到的事件有相当一部分它。 我无法在模糊事件中使用正常的setTimeout,因为用户可能坐在自动完成列表上而没有实际选择任何内容。
也许我可以在自动完成开放设置一个变量,所以我们知道它仍然是开放的。
如果定时器到期并且自动完成仍然打开,我们可以重置定时器。
然后关闭,我们可以取消设置变量。
或选择一个项目,我们可以取消定时器?
您认为如何?