Reply To: One page scrollto.js

#22696
Daniel Tara
Keymaster

I assume you are referring to the fact that the navigation doesn’t collapse when you click on an item. You will need to add a little JavaScript to make this work. Add this to your child theme’s functions.php file:

function enlightenment_child_collapse_navigation() {
    ?>
    <script>
        jQuery(document).ready(function($) {
            $('#site-navigation .menu-item a').on('click', function() {
                $('#site-navigation').removeClass('in');
            });
        });
    </script>
    <?php
}

add_action( 'wp_print_footer_scripts', 'enlightenment_child_collapse_navigation' );