1

我正在使用Galleriffic插件,它在 Chrome 和 Firefox 中运行良好,但在 IE 中运行良好并返回SCRIPT5009: 'e' is undefined。jQuery dodo:

// 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;
});
4

1 回答 1

4

看起来您缺少事件参数。e在函数调用中添加一个。

$("a[rel='history']").live('click', function (e) {
if (e.button != 0) return true;
于 2013-01-13T20:45:18.977 回答