我收到以下错误:
Uncaught SyntaxError: Unexpected token ( /timeline/scripts/collections/events.js?bust=1365755363650:1
这是/timeline/scripts/collections/events.js:
function () {
return Backbone.Collection.extend({
model: Event
, parse: function(data) {
var parsed = [];
$(data).find('Event').each(function(index) {
parsed.push({
title: $(this).find('title').text()
, date: $(this).find('date').text()
, content: $(this).find('content').text()
});
});
return parsed;
}
, fetch: function(options) {
options = options || {};
options.dataType = "xml";
Backbone.Collection.prototype.fetch.call(this, options);
}
});
};
出于某种原因,它令人窒息,function () {
但我不知道为什么。这是整个文件。谁能解释这有什么问题?