Home / Forums / DynamiX Support / Show dropdowns on click rather than on mouseover?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts

  • sethdotterer_sc
    Participant

    How would I adjust the menus so that items with drop downs open on click rather than on mouseover?

    Thanks,

    Hi @sethdotterer_sc

    This is possible but this will require custom javascripts and css codes that we do not support.

    Regards,


    sethdotterer_sc
    Participant

    Ok, can you give me a hint as to where I want to start looking to re-code? I’m happy to write something in jquery to change the action, but would appreciate it if you can point me in the right direction as to what selector I want to target or anything else that might be relevant.


    sethdotterer_sc
    Participant

    OK I added some Jquery and it kinda works:

    <script type='text/javascript'>
    jQuery(document).ready(function($){ 
    $("nav#nv-tabs ul li.hasdropmenu").click(function() {
    event.preventDefault();
    $(this).find('ul.sub-menu').toggle();
    });
    });
    </script>

    However there is a bit of a delay going on and sometimes ti doesn’t really seem to work like there is something that holds the menus in the on position for awhile.

    Also if I try and kill the initial hover behavior by adding this:

    nav#nv-tabs ul li.hasdropmenu:hover > ul, nav#nv-tabs ul  li.hasdropmenu > ul {
    display: none !important;
    }

    It stops working altogether.

    Ideally I need to kill the hover behavior and just have it work onclick but it seems like there is some code for the drops to keep in the hover postion that is working against me and I can’t find.


    sethdotterer_sc
    Participant

    URL: http://sitecompli.staging.wpengine.com/

    Hi Seth,

    I also tried a number tweaks from our end but we can’t get it to work. Unfortunately, this is already beyond our scope of support. It will be best to coordinate with a developer from Envato Studio to make this customization work

    Regards,

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.