Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/75.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.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
Javascript Adobe Edge预加载程序JQuery/$未定义_Javascript_Jquery_Adobe Edge - Fatal编程技术网

Javascript Adobe Edge预加载程序JQuery/$未定义

Javascript Adobe Edge预加载程序JQuery/$未定义,javascript,jquery,adobe-edge,Javascript,Jquery,Adobe Edge,我已经在AdobeEdge上工作了一段时间,我还想使用预加载程序通过AJAX为我的作品加载数据。为了实现这一点,我在Preload>loading事件中创建了以下代码。哪个事件有点问题,因为根本没有关于它的文档,所以我一点也不知道它何时被触发 // this little fella is fetching url- // parameters and puts them in a var called GET (function () { window.GET = {}; va

我已经在AdobeEdge上工作了一段时间,我还想使用预加载程序通过AJAX为我的作品加载数据。为了实现这一点,我在Preload>loading事件中创建了以下代码。哪个事件有点问题,因为根本没有关于它的文档,所以我一点也不知道它何时被触发

// this little fella is fetching url-
// parameters and puts them in a var called GET
(function () {
    window.GET = {};
    var s = window.location.search.substring(1).split('&');
    if (!s.length) return;
    for (var i = 0; i < s.length; i++) {
        var parts = s[i].split('=');
        window.GET[unescape(parts[0])] = unescape(parts[1]);
    }
}())

var playlist = GET["l"],
    playlistLoadSuccessHandler = function (data, status, xhr) {
        console.log(data);
    };

$.ajax({
    url: playlist,
    dataType: 'xml',
    success: playlistLoadSuccessHandler
});
//这个小家伙正在获取url-
//参数,并将其放入名为GET的变量中
(功能(){
window.GET={};
var s=window.location.search.substring(1.split('&');
如果(!s.length)返回;
对于(变量i=0;i
所以我得到的是:uncaughtreferenceerror:$未定义


有谁比我更了解AdobeEdge,知道我的错误在哪里吗?

显然,Edge就是这样工作的。jQuery在预加载程序完成其工作后加载。我将尝试在没有jQuery的情况下使用良好的“ol原生JS”,直到Adobe表现出一些宽容并解决了这个问题。

你在哪里加载jQuery?在执行代码时,它应该由edge运行时实现。如果我在我的代码中打印“this”,我可以看到$4已经存在并且正确地填充了jquery。如果jquery已经加载,请尝试jquery.ajax({因为您可能没有定义$4,我在预加载程序中阅读了几个关于使用jquery的示例,这些示例都像往常一样引用了带有$Ahh的jquery,我不好。不熟悉AdobeEdge