为什么此代码需要我单击两次才能显示日历?

问题描述

| 我在拼命解决这个问题后发布了这个问题。 在日历显示之前,我必须单击两次链接。 有人知道我的编码有误吗?谢谢你 建议。 calendar.PHP在document.ready函数中具有以下内容
---------------calendar.PHP------------------
    <script type=\'text/javascript\'>

        $(document).ready(function() {

            $(\'#calendar\').fullCalendar({
                header: {
                    left: \'prev,next today\',center: \'title\',right: \'month,agendaWeek,agendaDay\'
                }

            });

        });

    </script>
下面是calendar.PHP中的css:
    <style type=\'text/css\'>
        #calendar {
            width: 950px;
            margin: 0 auto;
            }
    </style>

---------------------------------------------
这是menu.js中的代码,该代码使用AJAX加载功能将日历加载到内容Div中:
-------------menu.js------------------
$(document).ready(function(){
        sections.click(function(){

        switch(this.id){
        case \"classes\":
            content.load(\"classcal.PHP\",function(responseText){
                loadjscssfile(\'../fullcalendar/fullcalendar.css\',\"css\");
                loadjscssfile(\'jquery-1.6.1\',\"js\"); 
                loadjscssfile(\'../jquery/jquery-ui-1.8.11.custom.min.js\',\"js\");
                loadjscssfile(\'../fullcalendar/fullcalendar.min.js\',\"js\");
            });
            break;
        ...
        ...
        }//switch

        });
});
-----------------------------------------------
    

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)