0

我无法ajaxStop在我的页面上开火。我在这里遗漏了一些明显的东西吗???

var photoArray = [];
var urls = [URL1, URL2] //these are proper URLS in the complete script
_.each(urls, function(url) {
    $.ajax({
        url: url,
        dataType: 'jsonp',
        error: function(x,y,z) {
            console.log(x,y,z);
        },
        success: instagrab
    });
});

$(document).ajaxStop(function() {
    console.log("ajaxstop");
    $(this).unbind('ajaxStop');
}); 
function instagrab(data) {
    _.each(data.data, function(val){
        var tagged = $.inArray(tag, val.tags);
        if (tagged !== -1) {
            photoArray.push(val);
        }
    });
}
4

1 回答 1

0

应该是$.each。你有一个下划线。

于 2012-06-12T23:20:27.177 回答