有人知道为什么jQuery文档准备就绪事件可能不会在网站上触发吗?我将这个脚本完全放在页脚,但它根本没有触发(jQuery 1.8已包含在head部分):
<script type="text/javascript">
jQuery(document).ready(function() {
alert('test');
jQuery("#slideshow iframe").each(function(){
alert('test');
});
});
</script>
没有 JavaScript 错误,控制台为空,并且当我在 Firebug 的控制台中运行此代码时,它可以正常工作:
jQuery("#slideshow iframe").each(function(){
alert('test');
});
jQuery(document).ready(function(){});
吗? - Giona