jQuery UI confusion
-
I’m attempting to create an accordion dropdown menu in a right sidebar. Currently, the left sidebar of the site is the main navigation and uses the Design Chemical plugin for the accordion UI: https://www.designchemical.com/blog/index.php/wordpress-plugins/wordpress-plugin-jquery-vertical-accordion-menu-widget/
I thought I could leverage this plugin for the right sidebar accordion menu I need to create, but this new menu is going to be dynamic (will be populated by months, years links from DB posts for news archive). The plugin requires you create a custom menu on the dashboard, so the dynamic requirements need me to look in another direction.
The style of the new accordion will also be different. So I thought it would be fairly easy to use the jQuery UI accordion function. However, if I enqueue the accordion script, I’m not seeing the CSS or JS in the page source. Here’s my script in functions.php:
function load_accordion() { wp_enqueue_script('jquery-ui-accordion'); wp_enqueue_script( 'custom-accordion', get_stylesheet_directory_uri() . '/js/site-accordion.js', array( 'jquery' ) ); }
Any ideas on what I might be doing wrong?
- The topic ‘jQuery UI confusion’ is closed to new replies.