OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
    • Go Live Update Urls
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Accordion Not Working On A Particular Site

Resolved

Requested: 4 years and 3 months ago

Hello,

I am having a problem where the settings I choose on the WordPress “customize” menu for the sidebar do not appear on the actual site. The sidebar menu displays correctly as long as the customize menu is open, with all child pages collapsed. As soon as I exit that menu however, all child pages are not collapse, and the menu is very long.

See screen shots:

Menu Open: https://paste.pics/f779aad8075862899204aeb991e637d2

Menu Closed: https://paste.pics/3f5c5b37ee4ecf959c010ba23c8c4efc

Thanks for your help!

Plugin: Advanced Sidebar Menu

  1. OnPoint Plugins

    4 years and 3 months ago

    Hi Cwolf,

    While troubleshooting your site, there seems to be a race condition that I have not seen before. Both the registering of the accordions and the init of them is controlled by an event that fires when the site is ready. For some reason (specific to your site) the events appear to fire in a different order and do not enable the accordion.

    To fix this issue, I have adjusted the registering of accordions to fire on a custom event which run when the accordion JavaScript is available.

    Please give version 3.4.4 of this plugin a try (published just now) and let me know if the issue still exists.

    Have a great day!

    Mat Lipe

  2. cwolf

    4 years and 3 months ago

    Hi Matt,

    Thanks for getting back to me so quickly. I just installed the new version of the plugin, but it looks like the issue is still there.
    Chris
  3. OnPoint Plugins

    4 years and 3 months ago

    Hi Chris,

    This was a tricky one to track down…

    Turns out, your theme is loading jQuery into the footer instead of the header. This causes jQuery to not be available when the widget loads and therefore the accordion does not register.

    If you move the jquery inside the <head> tag on your site the accordions will start working.

    Let me know if you have any questions.

    Mat Lipe

     

  4. OnPoint Plugins

    4 years and 3 months ago

    Good Morning Chris,

    I took another run at this and came up with a solution that will allow jQuery to be added to header or footer. Now the required JS that registers the accordions is output directly above the script (in the footer).

    Version 3.4.5 is now available which accommodates jQuery in the footer installs.

    Have a great day!

    Mat Lipe

  5. cwolf

    4 years and 3 months ago

    Hey Mat,

    Thanks! This is working great. I also realized that I was adding JQuery twice. Once in the head, and once in the footer, where WordPress automatically loads an older version unless you tell it not to. I took that one out.
    Appreciate the quick, hands on help!
    Hope you have a great new year!
    Chris

New Response Cancel reply

You must be logged in to respond. Only PRO members are allowed to respond to support requests.

© 2023 · WordPress Development · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact