gpt4 book ai didi

javascript - IE7 中的 HTML5 Doctype 破坏了 Jquery 下拉菜单

转载 作者:太空宇宙 更新时间:2023-11-04 15:21:10 24 4
gpt4 key购买 nike

当我在 IE7 中查看时,我的一个网站抛出了一个关于未定义 javascript 的错误。

经过一些研究,我认为这与我使用的文档类型有关,因为我使用的是 HTML5 样板。这应该不会造成问题,对吧?

谁能告诉我为什么会这样以及如何解决?网址是:http://njbuildingandmaintenance.com

这是我正在使用的菜单脚本(该错误未在此页面上复制...)http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/

谢谢

最佳答案

在您的文件“script.js”中,对象字面量末尾有一个逗号。

$(window).load(function() {
$('.flexslider').flexslider({
animation: "fade",
slideshow: true, //Should the slider animate automatically by default? (true/false)
slideshowSpeed: 7000, //Set the speed of the slideshow cycling, in milliseconds
animationDuration: 600,
keyboardNav: true, //Allow for keyboard navigation using left/right keys (true/false)
touchSwipe: true, // <---- HERE IS THE ERROR
});
});

去掉那个逗号。

关于javascript - IE7 中的 HTML5 Doctype 破坏了 Jquery 下拉菜单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9065091/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com