Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1483304

    Dear Support Team
    On the following website we have in the tab section: http://neu2024.creative-wave.com/rapid-prototyping-3d-print/#sla600
    The individual tabs of the tabs should be accessible via links.
    However, these anchor links do not work, for example:

    What can I do to make these links to the individual tabs work?
    Best regards Diana

    #1483319

    Hey Diana,

    Thank you for the inquiry.

    Are you trying to make the document automatically scroll and open the tabs when the links are used? If so, you can try adding this script in the functions.php file:

    add_action('wp_footer', function() {
        ?>
        <script>
        document.addEventListener('DOMContentLoaded', function() {
            (function($) {
                function scrollToTab(selector, eventType) {
                    $(selector).on(eventType, function(e) {
                        var hash = eventType === 'load' ? window.location.hash : $(this).attr('href').split('#')[1];
                        if (!hash) return;
                        var tab = $('.av-section-tab-title[href="#' + hash + '"]');
                        if (tab.length) {
                            var parent = tab.closest('.av-tab-section-outer-container');
                            var pos = parent.offset();
                            tab.trigger('click');
                            setTimeout(function() {
                                $(window).scrollTop(pos.top - 100);
                            }, 100);
                        }
                    });
                }
                scrollToTab('.avia-buttonrow-wrap a', 'click');
                scrollToTab(window, 'load');
            })(jQuery);
        });
        </script>
        <?php
    });
    

    Best regards,
    Ismael

    #1483335

    Dear Ismael

    Thank you very much for your quick reply.
    I have integrated the specified script into the function.php of the Enfold theme: however, it still does not work:
    Neither when I enter the link directly, nor as a jump marker as requested here:
    For the horizontal gallery of the “3D Equipment” >> see http://neu2024.creative-wave.com/rapid-prototyping-3d-print/#3d-equipment. >> when you click on the pictures (or button findmore) you should jump down to the tab section and then to the respective tab of the appropriate printer.
    And this link does not work either.

    What is the reason for this? and should I delete the copied script of the function.php or leave it there?

    Best regards, Diana

    #1483367

    Hi,

    We found a script error in the console which might be interfering with the script above.

    Uncaught TypeError: crypto.randomUUID is not a function
        at HTMLDocument.<anonymous> (rapid-prototyping-3d-print/:792:56)
    

    It’s from a CF7 script. You may need to fix it first or deactivate the plugin temporarily. We also recommend using a child theme and place the script there.

    Best regards,
    Ismael

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