jQuery/HTML - Disable OnClick

前端 未结 7 1026
面向向阳花
面向向阳花 2020-12-20 00:29

as the title says I\'m trying to disable OnClick for specific

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-20 00:36

    Try this?

    $('#test').unbind('click')
    

    OR

       $( "#test" ).bind( "click", handler );
       $( "#test" ).unbind( "click", handler );
    

    Try this

    $( "#test" ).on("click", function () {
      });
    $("#test").off("click");
    

提交回复
热议问题