javascript - 禁用仅适用于IE 11的插件

标签 javascript internet-explorer error-handling hamburger-menu

客户希望保留一个汉堡菜单,但是该站点非常困惑……仅在iE 11中。

https://lavidaapartments.com

有什么办法可以解决我在IE 11控制台中发现的这些错误?

SCRIPT1028:期望的标识符,字符串或数字
iwpmenu.js(30,21)

SCRIPT438:对象不支持属性或方法“iwpmenu”
wp_iwpmenu.js(2,5)

预先感谢您提出任何建议的解决方案。

最佳答案

您的网站在以下文件上生成错误:iwpmenu.js,行:30,列:21,它映射到:

jQuery('#iwpmenu_bar').delay(delayval).removeClass('open').animate({
    [direction]: [direction_width_minus] -- Expected identifier, string or number
}, options.close_bar_delay, function() {
    jQuery(this).css('display', '').find("ul.menu").css("padding-left", "20px");
});

发生错误是因为IE11不支持computed property keys(更多信息here)。

关于javascript - 禁用仅适用于IE 11的插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51405948/

相关文章:

javascript - 尝试通过传入函数来绑定(bind)回调会引发错误

javascript - document.write 在 Youtube videobar 的 javascript 中表现异常

javascript - Angular 2 的样式属性清理是否有安全的解决方法?

php - 为什么 Internet Explorer 的 gzip 压缩不起作用?

html - css attr(内容)在 IE 中不起作用

c++ - 关于编程中Generic Error Handling的问题

Javascript:不同的返回类型

.net - iexplore.exe.config 被忽略

c++ - 如何检测是否安装了自定义 terminate() 处理程序?

java - 播放文件时出错 : NullPointerException in Android