3256 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 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

2317 posts
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a Free File of the Month
  • Bought between 10 and 49 items
  • Europe
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 100 and 199 users
+1 more
CreativeMilk says

wrong order of files? noconflict?

3007 posts
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
+2 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
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 more
ParkerAndKent says

Hi guys,

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

Parker

3007 posts
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
+2 more
duotive says

you are welcome.

469 posts
  • Author had a File in an Envato Bundle
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Contributed a Tutorial to a Tuts+ Site
  • Exclusive Author
  • Has been a member for 4-5 years
  • India
+1 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
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Author had a File in an Envato Bundle
  • Author had a Free File of the Month
+4 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
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
+2 more
duotive says

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

by
by
by
by
by
by