title: Callback before calendar view is changed
body: <p>I added bootstrap popovers to the calendar events which open on click:
  </p>
  
  <pre class="lang-coffee prettyprint-override"><code>eventClick: (event, jsEvent, view) -&gt;
    if event.ajaxUrl?
      elem = jQuery(@)
      elem.popover('destroy')
  
      jQuery.ajax({url: event.ajaxUrl})
      .done (result) -&gt;
        elem.popover(
          placement: 'top'
          html: true
          trigger: 'manual'
          title: moment(event.start).format('dddd, DD. MMMM YYYY - HH:mm')
          content: result
          container: 'body')
  
        elem.popover('show')
  </code></pre>
  
  <p>My problem is, that these popovers stay open when I change the calendar view (e.g. change the month or to week/day layout). As the popovers are bound to the <code>.fc-event</code> divs/spans within the calendar, I need to access these DOM elements to run <code>.popover('destroy')</code>.</p>
  
  <p>Whenever a fullCalendar view is changed, the old DOM-Elements are replaced with the ones for the new view, so I would have to access them before the view is actually changed. Unfortunately there are only callbacks for event loading (<code>loading</code> which happens after the view is changed) and <code>viewDisplay</code> (same, but you get the new view).</p>
  
  <p>To make sure I understood <code>viewDisplay</code> correctly, I added a small test to the calendar which always gives me "0" (the data-selector comes from <a href="https://stackoverflow.com/questions/2891452/jquery-data-selector">jquery data selector</a>)</p>
  
  <pre class="lang-coffee prettyprint-override"><code>viewDisplay: (view) -&gt;
      alert(jQuery('.fc-event:data(popover)').size())
  </code></pre>
  
  <p>Is there a way to hook into the calendar process everytime the view is to be changed - but before the view is actually changed?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>For now I'm simply destroying the popovers once the mouse is moved over any calendar button (as a bind to <code>click</code> would be executed after the view change), but this solution is just a workaround</p>
  
  <pre class="lang-coffee prettyprint-override"><code>jQuery('.fc-button').on 'mouseover', () -&gt;
      jQuery('.fc-event:data(popover)').popover('destroy')
  </code></pre>