Attaching jQuery event handlers so that they are triggered first

前端 未结 9 1830
太阳男子
太阳男子 2020-12-05 09:36

Is there a way to attach a jQuery event handler such that the handler is triggered before any previously-attached event handlers? I came across this article, but the code d

9条回答
  •  萌比男神i
    2020-12-05 10:16

    what about this? bind the event and than do this:

    handlers.unshift( handlers.pop() );
    

提交回复
热议问题