How to add Jquery full Calendar Plugin in wordpress admin

杀马特。学长 韩版系。学妹 提交于 2019-12-25 05:29:13

问题


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'));

this my page code

 <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 .


回答1:


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".



来源:https://stackoverflow.com/questions/31335399/how-to-add-jquery-full-calendar-plugin-in-wordpress-admin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!