开发者

Loading multiple Fullcalendars in jquery tabs fails - loads all in 1st tab

开发者 https://www.devze.com 2023-02-04 18:43 出处:网络
I am attem开发者_运维技巧pting to do two things: Create multiple instances of a Fullcalendar displaying different event sources - this seems to be working when stacked on a page.

I am attem开发者_运维技巧pting to do two things:

  1. Create multiple instances of a Fullcalendar displaying different event sources - this seems to be working when stacked on a page.

  2. I need each Fullcalendar instance to appear within a different jquery tab. I have the tabbing code correct and working but for some reason all calendars are loaded within the 1st tab even though I am specifying each Fullcalendar to be on separate tab.

Ideas?


I'm using something similar to the code below. Works fine with jquery ui tabs. I'm using JSON for my event sources but you can add whatever event source you need etc.

$('#tabs').tabs({
  show: function() {
    $('#calendar1').fullCalendar('render');
    $('#calendar2').fullCalendar('render');
  }
});

$('#calendar1').fullCalendar({
  eventSources: [
    "json_events1.php"
  ]
});

$('#calendar2').fullCalendar({
  eventSources: [
    "json_events2.php"
  ]
});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号