Update accordion menu only from version 5 to 6

Hi, I was wondering if there’s a way to upgrade the Foundation version for only certain functionality.
There were some good feature updates to the Accordion menu that we would like to adapt but we don’t really want to touch the rest of the site and want to avoid any bugs creeping in with updating all the libraries.
Is there a way to adopt the changes only for the Accordion menu from version 5 to 6?

many thanks

Currently this is not possible out of the box. Foundation Sites is normally hooked to window.Foundation. Not sure if jQuery.noConflict would even help here. You could try to create a custom version but the plugin system and many other parts had many changes.

Thanks for the swift reply.
Understood, I saw no documented way of doing it but I thought I ask anyway.

The only reason we would do the update is to make the top level menu items on mobile linked and the toggle arrow icon open the dropdown only. In essence achieve separate submenu toggle action, like with data-submenu-toggle=“true”

Perhaps another way of achieving this on version 5 without update?