jQuery Multiple Event Handlers - How to Cancel?

后端 未结 6 743
盖世英雄少女心
盖世英雄少女心 2020-12-12 23:42

I have two functions bound to a click event at two different times (using jQuery). The order in which they are fired is significant. They are firing in the correct order.

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 00:47

    An other solution is to debounce or throttle the function.

    This way you could ensure despite it firing multiple times, it only executes within a set duration. This would allow your code to work as-is.

提交回复
热议问题