How do I properly load the jQuery fullcalendar plugin in a hidden div

后端 未结 10 1231
执念已碎
执念已碎 2021-01-01 16:47

I\'m using the jQuery tools tabs to divide my page into tabs. One of those tabs contain a jQuery Fullcalendar. Because I load JavaScript last in the page for speed and to av

10条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-01 17:11

    When the div is hidden, fullCalendar doesn't know what size it should render itself, so you just need to call the render function after you know that the div is visible.

    Attach it to the show event or whatever:

    $('#calendar').fullCalendar('render');
    

提交回复
热议问题