jquery - IE : SCRIPT5009: 'e' is undefined

标签 jquery internet-explorer

我正在使用Galleriffic插件,它在 Chrome 和 Firefox 中工作正常,但在 IE 中不行,并返回 SCRIPT5009: 'e' is undefined。 JQuery dode:

// Initialize history plugin.
// The callback is called at once by present location.hash. 
$.historyInit(pageload, "advanced.html");

// set onlick event for buttons using the jQuery 1.3 live method
$("a[rel='history']").live('click', function () {
    if (e.button != 0) return true;

    var hash = this.href;
    hash = hash.replace(/^.*#/, '');

    // moves to a new page. 
    // pageload is called at once. 
    // hash don't contain "#", "?"
    $.historyLoad(hash);

    return false;
});

最佳答案

您似乎缺少事件参数。在函数调用中添加 e

$("a[rel='history']").live('click', function (e) {
if (e.button != 0) return true;

关于jquery - IE : SCRIPT5009: 'e' is undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14307930/

相关文章:

javascript - 如何使用 jQuery 将光标位置设置在文本字段中字符串的末尾?

html - 文本缩进 : -9999em not working for span element in IE9

javascript - .load() 函数在 IE10/9 中不起作用

css - IE : Avoid always downloading font? 中的@font-face

css - 为什么在IE中输入错位?在firefox和chrome中都可以

javascript - 在 IE 中禁用滚动条

javascript - 先加载 JSON

javascript - 如何检查 URL 末尾是否有特定字符串

javascript - 自动完成与 keydown 混合

javascript - Jquery UI 选项卡和选择框 - 下一个/上一个按钮