0
我试图加载一个包含javascript链接的div到另一个页面上的另一个div(http://www.thebigkerbang.com/brand-storytellers/clients/xour-clients.html)和load()。我知道load()去掉脚本标记,但是我对$ .getscript有些困惑。我可以加载分区罚款,因为我可以在代码检查器中看到它。包含脚本的jQuery加载()div
加载该网页上的DIV:
<div id="beautific_hype_container" style="position:relative;overflow:hidden;width:700px;height:500px;">
<script type="text/javascript" charset="utf-8" src="beautific.hyperesources/beautific_hype_generated_script.js?10913"></script>
</div>
到DIV从这个页面:
<div class = "edgeContent"></div>
有:
$('document').ready(function(){
$(".beautific").click(function(){
$(".edgeContent").load('beautific/beautific.html #beautific_hype_container', function() {
$.getScript('beautific/beautific.hyperesources/beautific_hype_generated_script.js?10913');
});
});
});
你怎么感到困惑?什么不起作用? – fredrik 2013-04-20 14:45:02
谢谢Fredrik。这仍然只加载 '
奇怪的是,我自己使用这个方法,脚本没有被过滤掉。然后再次 - 我没有用'src'引用脚本,我把它放在了内联中。 – fredrik 2013-04-20 15:33:46