Jquery FullCalander不会在弹出窗口中加载 [英] Jquery FullCalander not loading in popup

查看:133
本文介绍了Jquery FullCalander不会在弹出窗口中加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用自定义CSS和js显示隐藏功能创建了一个弹出窗口。现在我想将calander放到该弹出窗口中。

我试过了

  $(document).on('click','.cliker',function(){
$(。succes_msg)。remove();
$ show = $(this)。 attr('pkid');
$(this).addClass('activer');
$(input [name = startTime]).val($(this).find(span ).eq(0).html()).timepicker();
$(。addbtn)。attr('pkId',$ show);

$(' #calendar')。fullCalendar({

defaultView:'basicWeek',
aspectRatio:1.5,
header:{
left:'prev,next',
center:'title',
right:''
},
dayOfMonthFormat:'ddd MMM / MM',
firstDay:4,
eventLimit: true,
render:true,
height:250,
buttonText:{
today:'today',
month:'month'},
eventSources:[{
url:'{{URL :: to(route('get_c alender_data'))}}',
类型:'get',
data:{cinema:0}
}],
});

$(。modelPophldr,.editShow)。show();
$(。editShow)。animate({'margin-top':'25px'});

});

像上面那样,我在fullcalander渲染后显示弹出窗口。
请建议如何解决它。



编辑...



现在日历是只有右箭头和左箭头,但日历未加载。当我点击下一个按钮时,它将完美地显示带有事件的日历。

解决方案

display:none 将元素从HTML流中移除,所以当你的元素变得可见时,你需要调用你的事件,说明为什么当你点击箭头时你的插件正在工作。



尝试初始化您的插件之后

  $(。modelPophldr,.editShow)。show(); 


I created a popup with my custom css and js show hide functions. Now I want to place the calander to that popup.

I tried

$(document).on('click', '.cliker', function () {
   $(".succes_msg").remove();
    $show = $(this).attr('pkid');
    $(this).addClass('activer');
    $("input[name=startTime]").val($(this).find("span").eq(0).html()).timepicker();
    $(".addbtn").attr('pkId', $show);

    $('#calendar').fullCalendar({

      defaultView: 'basicWeek',
      aspectRatio: 1.5,
      header    : {
        left  : 'prev,next',
        center: 'title',
        right : ''
      },
      dayOfMonthFormat: 'ddd MMM/MM',
      firstDay: 4,
      eventLimit: true,
      render: true,
      height: 250,
      buttonText: {
        today: 'today',
        month: 'month'        },
      eventSources: [{
        url: '{{URL::to(route('get_calender_data'))}}',
        type: 'get',
        data: {cinema: 0}
       }],
    });

    $(".modelPophldr,.editShow").show();
    $(".editShow").animate({'margin-top': '25px'});

});

Like above there I am showing the popup after the fullcalander rendering. Please suggest how to fix it.

Edit...

Right now the calendar is coming with only right and left arrows, but the calendar is not loaded. When I click on the next button it will show the calendar with events perfectly.

解决方案

display: none removes the element out of the flow of the HTML so you need to call your event when your element becomes visible that why your plugin is working when you click on arrows

try to initialize your plugin after

$(".modelPophldr,.editShow").show();

这篇关于Jquery FullCalander不会在弹出窗口中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆