title: Full Calendar Default View
body: <p>Since Full Calendar is not really suitable for smaller screen I'm trying to   change the "<strong>default view</strong>" of the full calendar according to the width size of the screen. </p>
  
  <p>I'm trying to implement that with this line code: </p>
  
  <pre><code>defaultView: (function () { 
    if ($(window).width() &gt;= 768) { 
      return defaultView = 'agendaDay'; 
    } else { 
    return defaultView = 'month'; 
    } 
  })
  </code></pre>
  
  <p>It's working fine however you have to refresh the browser every time to view the changes.</p>
  
  <p>I tried windowResize function but no Luck. Any help would really be appreciated. Looking for sulotion without refresh the page.
  Thanks in advance.</p>