Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.die在javascript中使用jplayer.playlist.min.js创建未定义错误_Javascript_Jquery_Jplayer - Fatal编程技术网

.die在javascript中使用jplayer.playlist.min.js创建未定义错误

.die在javascript中使用jplayer.playlist.min.js创建未定义错误,javascript,jquery,jplayer,Javascript,Jquery,Jplayer,这是我的问题。下面的代码来自jplayer.playlist.min.js。。。关于第142行,当您美化代码时 **<more code above here>...** _createItemHandlers: function() { var a = this; b(this.cssSelector.playlist + " a." + this.options.playlistOptions.itemClass)

这是我的问题。下面的代码来自jplayer.playlist.min.js。。。关于第142行,当您美化代码时

**<more code above here>...**
_createItemHandlers: function() {
        var a = this;
        b(this.cssSelector.playlist + " a."
                + this.options.playlistOptions.itemClass)
                .die("click") **//ERROR HAPPENS HERE!!!!!!!!!!**
                .live("click", function() {
                    var c = b(this).parent().parent().index();
                    a.current !== c ? a.play(c) : b(a.cssSelector.jPlayer).jPlayer("play");
                    b(this).blur();
                    return!1
                });
        b(a.cssSelector.playlist + " a." + this.options.playlistOptions.freeItemClass).die("click").live("click", function() {
            b(this).parent().parent().find("." + a.options.playlistOptions.itemClass).click();
            b(this).blur();
            return!1
        });
        b(a.cssSelector.playlist + " a." + this.options.playlistOptions.removeItemClass).die("click").live("click",
                function() {
                    var c = b(this).parent().parent().index();
                    a.remove(c);
                    b(this).blur();
                    return!1
                })
    },... **<more code here>**
讽刺的是,代码在这里的“.die”行消失了:.die(“单击”)“上面”

我得到的错误是:

未捕获类型错误: undefined不是函数jplayer.playlist.min.js:142 jPlayerPlaylist.\u createItemHandlers jplayer.playlist.min.js:142 jPlayerPlaylist jplayer.playlist.min.js:68 (匿名函数)custom.js:64 jQuery.event.dispatch jQuery-1.11.1.js:4641 elemData.handle jquery-1.11.1.js:4309

所以,底线;每当发出此调用时:this._createItemHandlers();错误发生了

非常感谢所有能够提供帮助的人。

发现问题:

我下载的jPlayer使用的是旧版本JQuery中弃用的.die和.live

只需将它们替换为.on和.off,您就是金色的。现在,jPlayer就像一个魔咒

.die=

.live=

希望这有帮助

干杯

$(window).load(function() {

new jPlayerPlaylist({
    jPlayer: "#jquery_jplayer_1",
    cssSelectorAncestor: "#jp_container_1"
    }, [
    {
        title: "Some title for the mp3",
        mp3: "../mp3/mymp3file.mp3"
    }
    ],
        {
            swfPath: "../libs/swfObject/",
            supplied: "mp3",
            wmode: "window",
            playlistOptions: {
                autoPlay: false
            }
        });
});