3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Hi,

I’m using the jquery ui framework to add some slider and accordion to my options, but after I enqueue the jquery ui framework the draggable boxes of the post and pages stop to work… they don’t even close/open anymore.

Anyone have any tip?

Thanks,

Parker

2324 posts
  • Has referred 100+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Helped several times protecting Envato Market against copyright violations
+6 more
CreativeMilk says

wrong order of files? noconflict?

3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
duotive says
hey.what is use:
       $dir = get_bloginfo('template_directory');
    wp_deregister_script("jquery");
    wp_enqueue_script("jquery", $dir."/js/jquery.js", false, null); 
you may want to see what script are added two times and stop adding them, or just deregister as i do above. for the jquery ui, the deregisters are
  • jQuery UI Core – jquery-ui-core
  • jQuery UI Tabs – jquery-ui-tabs
  • jQuery UI Sortable – jquery-ui-sortable
  • jQuery UI Draggable – jquery-ui-draggable
  • jQuery UI Droppable – jquery-ui-droppable
  • jQuery UI Selectable – jquery-ui-selectable
  • jQuery UI Resizable – jquery-ui-resizable
  • jQuery UI Dialog – jquery-ui-dialog
no conflict is only for using jquery with another javascript library….
you could try to move the new scripts to the wp_footer, to do that you just need to add a true value. i will explain with the example above
       $dir = get_bloginfo('template_directory');
    wp_deregister_script("jquery");
    wp_enqueue_script("jquery", $dir."/js/jquery.js", false, null, true); 
hope this helps. i got alot of problem with javascript compatibility between jquery and mootools. but now i am a master of compatibility :)) vlad
3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Hi guys,

thanks… I’ll make some tries… I’ll let you know ;)

Parker

3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
duotive says

you are welcome.

469 posts
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 4 years
  • Has sold $250,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+6 more
SaurabhSharma says

Hi Parker,

Are the UI JS files loading properly in the document? It has happened to me. When we use wp_enqueue_script(), it loads jquery just fine. But when we try to (especially) load ui-core, ui-tabs and ui-accordion, it just don’t.

So I had to load them in dependency order. i.e.

wp_enqueue_script('custom',
            get_bloginfo('template_directory') . '/js/custom.js',
            array('jquery-ui-core', 'jquery-ui-tabs'), '1.0'
        );
3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Hi guys,

this solved the issue:

wp_register_script('pk_jquery_ui', PK_THEME_DIR.'/parkerandkent/js/admin/jquery_ui/jquery-ui-1.8.6.custom.min.js', array('jquery'), null, true);
    wp_enqueue_script('pk_jquery_ui');

The in footer param needed to be set to true.

Thanks to all of you for the tips ;)

3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 more
duotive says

told you about the footer param :) glad you solved it.

by
by
by
by
by
by