Community Forums

Welcome to the community forums! Wants you register, you'll have access to submit anything that is related to the categories.

Register
Dismiss Notice
For all our customers you can enjoy 50% off of any xenForo 2.0 theme Just use "XF150OFF" coupon after adding your favorite theme to the cart

Off Screen Canvas Menu Question

Discussion in 'Feedback & Requests' started by Ev1dentFir3, Jun 30, 2016.

  1. Ev1dentFir3

    Ev1dentFir3 New Member Jun 30, 2016

    The off screen canvas, is there a way to make it so that the submenu's expand and despan on a hover, and not on a click. I would rather be able to click "home" or click "forum" and actually go to those pages instead of just closing the sub menu...

    What code changes would I need to make to do this?
     
    #1
  2. Dohtheme

    Dohtheme Administrator Staff Member Jul 1, 2016

    I am afraid that's can't be done as it need JS code modifications
     
    #2
  3. Ev1dentFir3

    Ev1dentFir3 New Member Jul 1, 2016

    I figured it needed some code modifications, that's what I was hoping to get help with... what code edits would need to be made to do it? As it is right now the links are there but clicking does nothing, even on links that's do not expand. Kind of a broken feature that way...
     
    #3
  4. Ev1dentFir3

    Ev1dentFir3 New Member Jul 1, 2016

    How would I change this code to make it open when I hover over it, and close when I hover off of it.

    Code:
    //open (or close) submenu items in the lateral menu. Close all the other open submenu items.
        $('.item-has-children').children('a').on('click', function(event){
            event.preventDefault();
            $(this).toggleClass('submenu-open').next('.sub-menu').slideToggle(200).end().parent('.item-has-children').siblings('.item-has-children').children('a').removeClass('submenu-open').next('.sub-menu').slideUp(200);
        });
     
    #4
    demo likes this.

Share This Page