Anyone else having issues with WordPress 3.6 and the Accordion UI?
I have a website that was working just fine till I updated it to WordPress 3.6. The accordion menu stopped working. No errors.
Enqueue
wp_register_script('accordion',get_template_directory_uri().'/js/accordion.js', array('jquery', 'jquery-ui-accordion'), 1.0, true);
My JS
jQuery('#accordion').accordion({
heightStyle: 'content',
collapsible: true,
active: false
});
Nothing happens at all when I click on the accordion links. Everything loads, correctly. No errors. I heard about issues with WordPress 3.6 and jQuery UI – but have not been able to find anyone with the same issue.
I’m not sure if it’s because “accordion” all of the sudden became a reserved word in wordpress. But once I switched my wp_enqueue_script/wp_register_script handle from accordion to myaccordion – everything worked.
As an alternative you can use the Jquery UI (1.10.3) already embedded in WordPress 3.6, with just:
http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_Scripts_Included_and_Registered_by_WordPress