Stop further event handlers on an element

后端 未结 2 1209
太阳男子
太阳男子 2020-12-29 21:18

I\'m writing a little jQuery extension that prevents a user from double clicking on a link.

$.fn.preventDoubleClick = function() {
    return this.click(func         


        
相关标签:
2条回答
  • 2020-12-29 21:37

    Thanks to Adam's link, I was able to see the function I needed: stopImmediatePropagation().

    0 讨论(0)
  • 2020-12-29 21:57

    I believe you're looking for event.stopPropagation

    EDIT: turns out this was not the correct option for Nick's purposes. Please see his answer.

    0 讨论(0)
提交回复
热议问题