Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #764244

    Hello at Kriesi,
    I am display the menu items as an icon, so I have the nice burger menu on all devices and browser sizes allt the time. Is it possible to open this menu on hover, not on click? That would be great.

    Best Regards

    #764580

    Hey Sigmund,

    I think it’s possible but I don’t think will serve much purpose since smaller devices which the burger menu shows up are either mobile phones or tablets where you don’t really have a hover.

    Best regards,
    Nikko

    #764749

    Hi Nikko,
    yes, I was thinking about that, but I want to give it a try. Any advice? I have tried it via CSS…
    Best Regards

    #764756

    if you manage that – you can try to insert this to your functions.php of child-theme:

    function add_touch_fix(){
    ?>
    <script>document.addEventListener("touchstart", function(){}, true);</script>
    <?php
    }
    add_action('wp_footer', 'add_touch_fix');

    on pads and phones it will give you a click-function by touchstart.

    #764781

    in avia.js on line 1765 there is the burger_wrap.click(function(e)

    to change it to hover by : burger_wrap.hover(function(e) is simple but does not bring the solution.
    So it does not work yet : It opens than but on leaving the (close button ) it closes immediately.

    • This reply was modified 7 years, 8 months ago by Guenni007.
    #765212

    Hi @Sigmund,

    Did you try out the suggestion posted by @guenni007 and did you have any luck with it?

    Best regards,
    Rikard

    #766041

    Hi,
    thanks @guenni007. I have not tried it yet, because I am afraid of going into the .js files.
    Best Regards

    #766526

    Hi,

    Ok, thanks for the feedback. Let us know if you try it out of if you should need any further help on the topic.

    Best regards,
    Rikard

    #1232499

    Hey everyone i know this is a very old thread…i did this and worked but i tried to copy avia.js to the child theme folder (like a good developer i am lol), and it didn’t work. any edit to avia.js works if its in the main enfold theme folder. is there anyway around that? please let me know!

    thank you <3

    • This reply was modified 4 years, 3 months ago by jgax87. Reason: forgot to check notify me of follow up emails
    #1232858

    Hi jgax87,

    Can you try using this code in your child theme’s functions.php (also make sure that avia.js is located at the js folder of your child theme):

    function change_aviajs() {
        wp_dequeue_script( 'avia-default' );
        wp_deregister_script( 'avia-default' );
    
        wp_enqueue_script( 'avia-default', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
    }
    add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );

    Best regards,
    Nikko

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.