jquery ui sortable library not getting included
-
I have ajax sack, jquery ajax, and jquery working fine, but not jquery ui (sortable).
In beginning of plugin file I do: –
... add_action('init','biz_init'); function biz_init() { //wp_enqueue_script('jquery'); //wp_enqueue_script('jquery-ui-sortable'); //wp_enqueue_script('jquery-ui-widget'); //wp_enqueue_script('jquery-ui-mouse'); //wp_enqueue_script('jquery-ui-core'); //wp_enqueue_script( array("jquery", "jquery-ui-core", "interface", "jquery-ui-sortable", "wp-lists", "jquery-ui-sortable") ); //wp_enqueue_script('item-jui',plugins_url('/js/item.js',__FILE__),array("jquery-ui-core", "interface", "jquery-ui-widget", "jquery-ui-mouse", "wp-lists", "jquery-ui-sortable"), '', true); } ... add_action('admin_print_scripts','biz_subsc_catg_js_admin_header'); //Add Ajax to the admin side add_action('admin_head','biz_items_js_admin_header'); //Add JQuery to the admin side add_action('admin_head','biz_items_jui_admin_header'); //Add JQuery to the admin side ... function biz_items_jui_admin_header() { // wp_enqueue_script('item-js', plugins_url( '/js/item.js', __FILE__ ), array("jquery-ui-core", "interface", "jquery-ui-widget", "jquery-ui-mouse", "wp-lists", "jquery-ui-sortable"), '', true); wp_enqueue_script(array("jquery-ui-core", "interface", "jquery-ui-widget", "jquery-ui-mouse", "wp-lists", "jquery-ui-sortable")); ?> <script type="text/javascript" > $(function() { $( "#sortable1, #sortable2" ).sortable().disableSelection(); }); </script> <?php } function biz_items_js_admin_header() { // Set JQuery calls for Items ?> <script type="text/javascript" > jQuery(document).ready(function($) { ... function biz_subsc_catg_js_admin_header() { //Set Ajax Calls for manager wp_print_scripts(array('sack')); //use JavaScript SACK library for Ajax ?> <script type="text/javascript"> function <func_name>() { ...
You can see I have tried to place wp_enqueue_scripts at different places, but its not working.
Any help would be appreciated.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘jquery ui sortable library not getting included’ is closed to new replies.