jQuery prevent other events after a click

后端 未结 6 1021
谎友^
谎友^ 2020-12-14 07:15

I am trying to prevent multiple clicks on links and items, which is causing problems.

I am using jQuery to bind click events to buttons (jQuery UI) and image links (

6条回答
  •  猫巷女王i
    2020-12-14 07:33

    There is event.preventDefault, event.stopPropagation and return false as already stated.

    $("a").click(function(e) {
        e.preventDefault();
        e.stopPropagation();
        return false;
    }
    

提交回复
热议问题