IE 7/8 / Chrome $(window).load问题
我的网站在 mac ff/safari 上运行良好。在 pc ie 7/8 和 chrome 上,我收到一个错误 $ is not Defined ,涉及
$(window).load(function (){}
任何人都可以建议解决方法吗?我选择使用 window.(load) 而不是 (document).ready,因为我正在加载一些大的背景图像,并希望它们在开始时加载,而不是冒着稍后加载延迟的风险。
谢谢!
My site is runnin fine on mac ff/safari. On pc ie 7/8 and chrome I get an error $ is not defined relating to
$(window).load(function (){}
Can anyone suggest a workaround. I chose to use window.(load) over (document).ready as I am loading in some big background images and would like them to load at the start rather than risk loading delays later.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保 jQuery 已加载到您的页面上
确保
$
可用且分配正确<前><代码>(函数($){
$(文档).ready(函数(){
});
})(jQuery);
make sure jQuery is loaded on your page
make sure the
$
is available and assigned correctly