是否有可能在這些情況下觸發的輸入上定義事件。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,因爲用戶可能坐在自動完成列表上而沒有實際選擇任何內容。
也許我可以在自動完成開放設置一個變量,所以我們知道它仍然是開放的。
如果定時器到期並且自動完成仍然打開,我們可以重置定時器。
然後關閉,我們可以取消設置變量。
或選擇一個項目,我們可以取消定時器?
您認爲如何?