weixin_33716154 2011-11-23 16:03 采纳率: 0%
浏览 52

jQuery加载…执行父级js

I have a PHP query that displays the first 30 documents, then an anhor which loads the rest of the documents using jQuery load.

Although, the parent uses javascript for some effects. Although once loaded onto the document it doesn't seem to inherit it's script tags.

is there any solution for this?

  • 写回答

1条回答 默认 最新

  • weixin_33697898 2011-11-23 16:06
    关注

    you have to put your "effects" into a function, then in the success of the load you have to call that function again.

    function effects(){
         //all your effects
    }
    $('#result').load('ajax/test.html', function() {
       effects();
    });
    
    评论

报告相同问题?