如何在WordPress管理员中添加jQuery完整的日历插件 [英] How to add Jquery full Calendar Plugin in wordpress admin

查看:79
本文介绍了如何在WordPress管理员中添加jQuery完整的日历插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在插件中添加了这些文件.

I have added these file in my plugin .

function  fullcalendar(){
        wp_enqueue_style( 'full-css', 'http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.2.3/fullcalendar.min.css' );
        wp_register_script( 'js','https://code.jquery.com/jquery-1.7.min.js' );
        wp_register_script( 'moment-js','http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js' );
        wp_register_script( 'ui-js','http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"' );
        wp_register_script( 'full-js', 'http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.1.1/fullcalendar.min.js' );
        wp_enqueue_script('js');
        wp_enqueue_script('moment-js');
        wp_enqueue_script('ui-js');
        wp_enqueue_script('full-js');
    }
add_action('admin_enqueue_scripts', array( $this,'fullcalendar'));

这是我的页面代码

 <div id="calender" >
          </div>
<script>
jQuery(document).ready(function() { 

    jQuery('#calendar').fullCalendar({
    }); 
});
</script>

目前它没有给我任何错误,也没有给我所需的结果.

Currently its not giving me any error nor its giving required result .

推荐答案

您的问题很可能是div id标签中的拼写错误. ID为日历" ,而您在javascript中的选择器为日历" .

your problem is most likely the spelling error in your div id-tag. The id is "calender" while your selector in the javascript is "calendar".

这篇关于如何在WordPress管理员中添加jQuery完整的日历插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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