More than a year away from the post of @maiconjoet entitled “Main menu does not collapse on click” even in the latest version (2.1.1) the problem has not been fixed.
The solution indicated is to insert the following code in the “mercantile-custom.js” file present in /public_html/wp-content/themes/mercantile/assets/js
`
$ (document) .on (‘click’, ‘. navbar-collapse.in’, function (e) {
if ($ (e.target) .is (‘a’) && ($ (e.target) .attr (‘class’)! = ‘dropdown-toggle’)) {
$ (This) .collapse ( ‘hide’);
}
});
I have always used the child theme to not lose all the customizations made with updates released later.
The question is:
how to create and recall the modified (mercantile-custom.js) file with the added code in the mercantile-child directory?
Just copy the assets / js folder and the mercantile-custom.js file to the mercantile-child folder or do you need the call via the function.php file?
Thank you for making this thema available to everyone and I hope in your suggestions.
Max