title: php include expression prevents FullCalendar from rendering
body: <p>I am dealing with 2 php files which are tabs.php and timetable.php. tabs.php acts as a navbar and directs the user to many pages including timetable.php. Whereas timetable.php has a FullCalendar that works perfectly. The way I direct the user from tabs.php to timetable.php is as follows:</p>
  <pre><code>&lt;li&gt;&lt;button class=&quot;tablink&quot; onclick=&quot;openPage('Timetable', this)&quot;id=&quot;defaultOpen4&quot;&gt;Timetable&lt;/button&gt;&lt;/li&gt;
  &lt;div id=&quot;Timetable&quot; class=&quot;tabcontent&quot;&gt;
    &lt;?php include(&quot;timetable.php&quot;); ?&gt;
  &lt;/div&gt;
  </code></pre>
  <p>The script for FullCalendar is as follows:</p>
  <pre><code>&lt;script&gt;
      $(document).ready(function() {
        $('#calendar').fullCalendar({
          editable: false, //Prevents user from moving around events
          header: {
            left: 'prev, next today',
            center: 'title',
            right: 'month, agendaWeek, agendaDay'
          },
          events: function(start, end, timezone, callback) {
            $.ajax({
              url: 'loadEventsStudent.php',
              dataType: 'json',
              data: {},
              success: function(data) {
                var events = [];
  
                for (var i = 0; i &lt; data.length; i++) {
                  events.push({
                    title: data[i]['class'],
                    start: data[i]['start_event'],
                    end: data[i]['end_event'],
                  });
                }
                //adding the callback
                callback(events);
              }
            });
          }
        });
      });
    &lt;/script&gt;
  </code></pre>
  <p>The issue is that when I go to the timetable page, only the buttons of the calendar are visible. Once I click any of these buttons, the calendar then gets rendered. The script for the FullCalendar works perfectly fine as I tried running it on another file which makes me think that the include expression is causing this issue. When I try to inspect the Network tab of my browser, I noticed that once I open the timetable page, nothing happens, but once I click on any of the calendars' buttons, the loadEventsStudent.php file (stores data from a database) appears and then the calendar gets rendered. Is there a way to make the calendar render without having to change the way both files are connected?</p>