Question

I've been working with Adobe Edge for some time now and I also want to use the Preloader to load data for my composition via AJAX. To achieve this I created the following code inside the Preloader>loading-Event. Which event is a bit of a Problem because there is no documentation at all for that, so I have not the slightest idea when it is fired.

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

So and all I'm getting is this: Uncaught ReferenceError: $ is not defined

Has anyone a little more experience in Adobe Edge than me and knows what my mistake is here?

Was it helpful?

Solution

Apparently that's the way Edge works. jQuery is loaded after the preloader has done its work. I will try to get around without jQuery and use good 'ol native JS until Adobe shows some mercy and fixes this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top