jQuery click event not working after adding class

前端 未结 7 1781
臣服心动
臣服心动 2020-11-22 01:47

In my JSP page I added some links:

Organization Data


        
7条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 02:35

    Here is the another solution as well, the bind method.

    $(document).bind('click', ".intro", function() {
        var liId = $(this).parent("li").attr("id");
        alert(liId);        
    });
    

    Cheers :)

提交回复
热议问题