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

后端 未结 10 1282
执念已碎
执念已碎 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:24

    i had a similar issue using easyappointments project, the solution was to call fullCalendar('render') , within a callback function after the next wizard div is showed:

    JQuery Code:

     // Display the next step tab (uses jquery animation effect).
            var nextTabIndex = parseInt($(this).attr('data-step_index')) + 1;
      $('#button-next-1').click(function () {
    
             $(this).parents().eq(1).hide('fade', function () {
                     /* some code */
                 $('#wizard-frame-' + nextTabIndex).show('fade');
                  $('#calendar').fullCalendar('render');
             });
        });
    

    Html Code:

               
    /*some code*/

提交回复
热议问题