我无法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);
}
});
}