• I’m Unable to drag and drop after adding the jquery ui (query-ui-1.8.7.custom.min.js) on admin page.

    I tried to add Accordion in jquery ui but after adding query ui (query-ui-1.8.7.custom.min.js) on admin page , drag and drop not working in any area in admin page but Accordion is working .

    what should I do to fix that problem.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Where did you get the query-ui-1.8.7.custom.min.js file from? The WordPress admin area already includes and uses jQuery-UI for multiple things, so you may be causing a conflict by trying to pull in your own custom jQuery-UI script.

    First, check that JQuery v1.5 isn’t loading (perhaps from a CDN). I’ve just found that WP3.0.x (and maybe earlier) is incompatible with it; producing the symptoms stated above.

    I had a similar problem where my plugin seemed to mess up the drag/drop throughout the admin interface. I found that re-including jquery in the admin interface blindly was the problem; therefore, I added code to only include the .js files I need when I need them. Keep in mind this is for a plugin I am developing called Artistography (didn’t feel like generalizing this code).

    add_action(‘admin_menu’, ‘artistography_plugin_menu’);
    function artistography_plugin_menu() {

    GLOBAL $artistography_plugin_dir, $i18n_domain;

    /* only include this stuff if we need it — since it messes up other things in the admin interface */
    if( FALSE !== stripos($_GET[‘page’], ‘artistography’) ) {
    wp_enqueue_style( ‘jquery-ui’, plugins_url(‘/css/jquery-ui.css’, $artistography_plugin_dir), array(), ‘1.0.0’, ‘all’);
    wp_enqueue_style( ‘artistography’, plugins_url(‘/css/style.css’, $artistography_plugin_dir), array(), ‘1.0.0’, ‘all’);
    wp_enqueue_script( ‘jquery-ui’, plugins_url(‘/js/jquery-ui-1.8.9.js’, $artistography_plugin_dir), array( ‘jquery’ ), ‘1.0.0’);
    wp_enqueue_script( ‘artistography’, plugins_url(‘/js/admin.js’, $artistography_plugin_dir), array( ‘jquery-ui’ ), ‘1.0.0’);
    }

    /* setup the admin menu for your plugin here */

    }

    Are you loading your own version of jQuery? Are there any errors being generated? Are you using FireBug?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Unable to drag and drop after adding the jquery ui on admin page.’ is closed to new replies.