title: How to send calendar events through ajax response in jquery fullcalendar
body: <p>I am using jQuery Fullcalendar with Codeigniter. Firstly I have a table with schedule time and name. I am sending data to <code>fullcalendar.js</code> when I am loading calendar page but I want in ajax response. How I am proceed? Please help me.</p>
  
  <p>I have tried below code.</p>
  
  <pre><code>function get_locationdata(start, end) {
      $.ajax({
          type: "POST",
          url: '&lt;?php echo base_url(); ?&gt;/index.php/Task_controller/get_schedulelocationsdata',    
          data: {
              start: start,
              end: end,
              user_id: user_id
          },
          success: function(resp) {
              defaultEvents = resp;
          }
      });
  }
  
  defaultEvents = resp;
  
  &lt;script src = '&lt;?php echo base_url(); ?&gt;assets/plugins/fullcalendar/dist/fullcalendar.min.js'&gt;&lt;/script&gt;
  &lt;script src = "&lt;?php echo base_url(); ?&gt;assets/pages/jquery.fullcalendar.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p><code>defaultEvents</code> is an array which I sent to <code>jquery.fullcalendar.js</code>
  and in resp I am getting <code>json_encoded</code> data.I want to send events to <code>fullcalendar.js</code> using ajax response.</p>