IE7中的HTML5文档类型破坏了Jquery下拉菜单

HTML5 Doctype in IE7 breaking Jquery Dropdown Menu

本文关键字:坏了 Jquery 下拉菜单 类型 中的 HTML5 文档 IE7      更新时间:2023-09-26

当我在IE7中查看javascript时,我的一个网站出现了一个关于没有定义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
        });
    });

去掉那个逗号。