jQuery not working in AJAX Loaded page

邮差的信 提交于 2019-11-30 02:20:30

Sounds like you need

$('#go1').live('click', function() {});

$.fn.live, as event handlers are only registered on initial dom creation, and you're repopulating the DOM and those aren't attached.

More info @ http://docs.jquery.com/Events/live

If i'm reading that right you are adding the click handlers at the beginning. These only affect current buttons. You may just need to change that to a Live event.

Yene Mulatu
 $("#peopleResult_list").on('click','a', function(event){
    //do you code here  
 });

on event work for current dom in your page and any dom loaded by ajax in the future

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!