当我在 IE7 中查看我的一个网站时,它会抛出有关 javascript 未定义的错误。
经过一番研究,我认为这与我正在使用的 Doctype 有关,因为我正在使用 HTML5 Boilerplate。但这应该不会造成问题,对吧?
谁能告诉我为什么会发生这种情况以及如何解决它?网站是: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/