Execute jQuery once document is ready AND iframe content is loaded

人走茶凉 提交于 2019-12-03 11:55:43

same ready() function

$(document).ready(function() {
    $('#frameId').ready(function() {
    ...
    });
})

Use $('#iframeId').load(function() { ... }); instead of onReady. The underlying issue is that there are cross-domain security risks to allowing the parent frame access to an iframe's content, so onReady is not available, but onLoad is still accessible. For more details, see: http://www.nczonline.net/blog/2009/09/15/iframes-onload-and-documentdomain/

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