Jquery click event doesn't work

前端 未结 1 1313
醉酒成梦
醉酒成梦 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)
提交回复
热议问题