title: FullCalendar: events not rendering initially from function call (AJAX)
body: <p>I've configured my FullCalendar to pull its events from an AJAX request, but they don't render on the calendar when the page is first loaded. </p>
  
  <pre><code>$(document).ready(function() {
  
      sh1client = new Array();
      sh2client = new Array();
  
      $('#sh1_cal').fullCalendar({
  
           height: 1000,
           minTime:'9:00am',
           maxTime:'5:00pm',
           editable: false,
  
           events: function(start, end, callback) {
  
              $.ajax({
                  type: 'GET',
                  url: 'http://localhost:8080/getEvents',
                  dataType: 'json',
                  success: function(reply) {
  
                      console.log(reply.first);
                      callback(reply.first);
  
                  }
              });
          }
      });
  
  
      $("#sh1_cal").fullCalendar('addEventSource', sh1client);   // these are the clientside arrays
  
  });
  </code></pre>
  
  <p>And on the server, </p>
  
  <pre><code>app.get('/getEvents', function(req, res){
  
      console.log('Server: passing events...');
  
      var arrays = {first: sh1, second: sh2}
      var pack = JSON.stringify(arrays)
  
      res.writeHead(200, {'Access-Control-Allow-Origin' : '*', 'Content-Type': 'application/json'});
      res.end(pack);
  
  });
  </code></pre>
  
  <p>Is there any reason these events wouldn't initially load? Everything seems to be being passed through alright, but it's like the callback isn't working or something.</p>
  
  <p><em>EDIT:</em> Here is another approach I tried</p>
  
  <pre><code>events: { 
  
              url: 'http://localhost:8080/getEvents',
              type: 'GET',
  
              error: function() {
                  alert('there was an error while fetching events!');
              },
  
              success: function(reply) {
                  console.log(reply);
                  //callback(reply.first);
              },
  
              color: 'yellow',   // a non-ajax option
              textColor: 'black' // a non-ajax option
  
           }
  </code></pre>
  
  <p><em>EDIT</em>: JavaScript console shows this as being POSTed to the page as soon as it loads (this is the first object in an array:</p>
  
  <pre><code>[Object]
  allDay: "false"
  end: "1392129000"
  id: "phil@google.com"
  room: "Sh1"
  start: "1392127200"
  title: "Phil - Google"
  __proto__: Object
  length: 1
  __proto__: Array[0]
  </code></pre>