jQuery click won't work with new infinite scroll elements

后端 未结 2 785
一生所求
一生所求 2021-01-28 03:19

On my page, I have a list with items and you can click on a \"View More\" button which shows you more information about this topic. This click function is in jQuery on an other

2条回答
  •  误落风尘
    2021-01-28 03:58

    try

    $(document).on("click",".click-job-viewmore",function(e) {});
    

    Because you should use delegates for dynamically created objects. It will help you to attach events for future elements to be created.

提交回复
热议问题