I want to do this in js/jquery:
var events = new Array();
var $event1 = [id, name, starttime, startposition];
var $event2 = [id2, name2, starttime2, startposition2];
var $event3 = [id3, name3, starttime3, startposition3];
events["fistcolumn"].push($event1, $event2, $event3);
this doesn’t work… can you please tell me how to do it?
There are no associative arrays in javascript, you can use an object:
Also, lose the $ in front of your vars, that is php syntax 🙂
Update:
For your events, you should probably also use objects:
var event2 = {
id: id2,
name: name2,
starttime: starttime2,
…
};