Jquery click event doesn't work

前端 未结 1 1295
醉酒成梦
醉酒成梦 2021-01-24 09:36

no result occur when i click test1 of test2



    

        
相关标签:
1条回答
  • 2021-01-24 10:24

    You need to put the event registration in document.ready() so that the element you are trying to bind the event are ready to your script.

    $(document).ready(function(){
    
      $(".trigger").click(function(event){
            console.log("d");
        });
    
    });
    
    0 讨论(0)
提交回复
热议问题