Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1339874

    Is there a way I could open the menu from a link or button inside a post or page?

    #1340159

    Hey arasaac,
    You could try this script, I tested it with a slideshow button and it worked, so you will need to adjust it to use the class you are going to use.
    Try adding this code to the end of your functions.php file in Appearance ▸ Editor:

    function custom_script() { ?>
        <script>
    (function($){
        $('a.avia-slideshow-button').on('click', function(e) {
            e.preventDefault();
            $('.av-burger-menu-main a').trigger('click');
        });
    })(jQuery);
    </script>
        <?php
    }
    add_action('wp_footer', 'custom_script');

    If you need help adjusting this then include an admin login in the Private Content area and a link to a text page with the element you want to use as the trigger.

    Best regards,
    Mike

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