JQuery and frames - $(document).ready doesn't work

后端 未结 12 2327
长发绾君心
长发绾君心 2020-12-14 09:51

I have a page, with some code in js and jQuery and it works very well. But unfortunately, all my site is very very old, and uses frames. So when I loaded my page inside a fr

12条回答
  •  既然无缘
    2020-12-14 10:22

    I know this is an old topic. But to help some of you who reach this page, here is my solution:

    $($("#frameName")[0].contentWindow.document).ready(function() {
        // Write you frame onready code here
    });
    

提交回复
热议问题