While you’re at it, could you also make another selector more specific? In zerif.js, there are many references to:
jQuery('.current').removeClass('.current')
which are usually removing the ‘.current’ class. The problem is, these selectors remove the ‘.current’ class from all elements on the page that have it. This causes problems with other libraries (such as Bootstrap Multiselect, in my case), which use the ‘current’ class to highlight specific items or such.
I’m not sure what those lines of code are actually trying to do, but would you be able to make that selector more specific so it only refers to elements you actually need to modify?
Thanks!
If you put Bootstrap Collapse elements anywhere in the main content section of the page (insert it via a Shortcode, for example), and it’s in it’s “open” state, then whenever you click a menu item, it will collapse it before going to whatever page you just clicked the link for.
I think if you just change line 49 of zerif.js to:
jQuery('#site-navigation .collapse').removeClass('in');
(i.e. make it a more specific selector by adding the ‘#site-navigation’), it should solve the issue.