如何獲取appointments
數組中的對象,其中appointments.id = calEvent.id
?獲取JavaScript數組中的對象其中appointmentments.id = calEvent.id
appointments.push({
id: id,
start: startFormatted,
end: endFormatted,
title: '<b>' + title + '</b><br><div id="event_body">' + body + '</div>',
userId: userid,
categoryId: categoryId,
counterId: counter
});
eventRender : function(calEvent, $event) {
var id = calEvent.id;
// get the object in the appointments-array where appointments.id = calEvent.id
}
作爲'calEvent'傳遞的對象是什麼? – 0x499602D2
這是jQuery weekcalendar插件中的日曆事件。 calEvent.id等於appointmentments.id中的一個。 – doonot