Support » Plugin: Bellows Accordion Menu » Expand on hover?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author sevenspark

    (@sevenspark)

    Hi @pressworthammer ,

    Currently there isn’t a setting for that – I haven’t personally seen an accordion menu work that way. I would consider adding it if there’s a use case for it. Do you have an example of a hover-triggered accordion navigation menu I could take a look at?

    Best,

    Chris

    Thread Starter pressworthammer

    (@pressworthammer)

    Here is one I built, not working 100% correctly though:
    http://itq.seowerk.net/kompetenzen/software-engineering/

    Plugin Author sevenspark

    (@sevenspark)

    Hi @pressworthammer ,

    I’ll have to consider whether it makes sense to add this to the core plugin or not – I’m afraid accordions on hover would have a negative impact on UX, and I haven’t seen a real world use case where triggering on hover would be advantageous. I’ll do a little more research into it.

    However, I’ve written some custom javascript that you could use with Bellows which would trigger the submenus on hover and close them on hover-out:

    jQuery( '.bellows-subtoggle' ).on( 'mouseenter' , function(){ 
      if( jQuery( this ).parent().parent(':not(.bellows-active)' ).length ) jQuery( this ).trigger( 'click' );
    });
    jQuery( '.bellows-menu-item-has-children' ).on( 'mouseleave' , function(){
      if( jQuery( this ).hasClass( 'bellows-active' ) ){
        jQuery( this ).find( '> .bellows-target > .bellows-subtoggle' ).trigger( 'click' );
      }
    });

    What I would do in a future version is to expose the submenu open/close functions to the API so that this code could be written a little more robustly/concisely.

    Hope that helps! πŸ™‚

    Chris

    Plugin Author sevenspark

    (@sevenspark)

    Also, I put up a demo page with this example so you can see how the custom code would work:

    https://wpaccordionmenu.com/hover-accordion-menu/

    πŸ™‚

    Thread Starter pressworthammer

    (@pressworthammer)

    Thanks for the support, I like it. Good showcase!

    Plugin Author sevenspark

    (@sevenspark)

    You’re welcome! πŸ™‚

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Expand on hover?’ is closed to new replies.