• Some time ago someone helped me on this forum with a collapsible menu for this website. It works fine, but when i try to add this code to another website i’m working on for the same purpose it doesn’t work like it’s supposed to.

    I’ve got no experience with Jquery what so ever, so any help would be greatly appreciated.

    The code used is this:

    <script type=”text/javascript”>
    if(jQuery(‘.current-menu-ancestor’).length == 0) {
    jQuery(‘.sub-menu’).hide();
    }
    jQuery(‘.sub-menu’).closest(‘.menu-item’).children(‘a’).click(function(e){
    jQuery(this).parent(‘.menu-item’).children(‘.sub-menu’).slideToggle();
    e.preventDefault();
    })
    </script>

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need some Jquery help with collapsable menu’ is closed to new replies.