jquery - disable click

后端 未结 7 1248
忘掉有多难
忘掉有多难 2020-12-04 15:27

I just want to disable the ability for a user to click on an element for some condition. Here is some of the code I am working with:

     $(\'#navigation a\         


        
7条回答
  •  一生所求
    2020-12-04 15:50

    Raw Javascript can accomplish the same thing pretty quickly also:

    document.getElementById("myElement").onclick = function() { return false; } 
    

提交回复
热议问题