Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1228243

    Hi,

    I found this post:

    My question is, would it be possible to hide the left arrow when the user is on the first item of the menu? And hide the right arrow if the user is on the last item on the menu? Referring to the menu of the tab section.

    Thank you!

    #1228435

    Hey Oscar,

    Please provide a link to your site/page in question so we can look into this issue further.

    Best regards,
    Jordan Shannon

    #1228451

    Hi Jordan,

    Thank you for your response. The arrow is only visible under a 767 width.

    Regards.

    #1228455

    Hi,

    I’m currently only seeing a right arrow on your page. Did you already add any custom css for this?

    Best regards,
    Jordan Shannon

    #1228458

    Hi Jordan,

    That’s correct. But would it be possible to hide the arrow if the person is on the last element of the menu?

    Regards

    #1229888

    Hi Oscar,

    Please add this code at the bottom of your child theme’s functions.php:
    (If you don’t have a child theme) you can download and find the instructions in our documentation: https://kriesi.at/documentation/enfold/child-theme/

    function tab_section_arrows(){
        ?>
        <script>
            (function( $ ) {
                var $ts = $('.av-tab-section-outer-container');
                var $tab = $ts.find('.av-section-tab-title');
                
                getActiveTab();
    
                $tab.on('mouseup', function() {
                    setTimeout(getActiveTab, 100);
                });
                
                function getActiveTab() {
                    if( $tab.first().hasClass('av-active-tab-title') ) {
                        $ts.addClass('av-start');
                        $ts.removeClass('av-end');
                    } else if ( $tab.last().hasClass('av-active-tab-title') ) {
                        $ts.addClass('av-end');
                        $ts.removeClass('av-start');
                    } else {
                        $ts.removeClass('av-start');
                        $ts.removeClass('av-end');
                    }
                }
                
            }(jQuery));
        </script>
        <?php
    }
    add_action('wp_footer', 'tab_section_arrows');

    and on your Quick CSS, please use this instead (slight modification from the original):

    @media only screen and (max-width:767px) {
      .av-tab-section-outer-container:after,
      .av-tab-section-outer-container:before {
        font-family: 'entypo-fontello';
        font-size: 50px;
        position: absolute;
        top: 100px;
        z-index: 1000;
        -webkit-transition: all 0.4s ease-out;
        -moz-transition: all 0.4s ease-out;
        transition: all 0.4s ease-out;
      }
    
      .av-tab-section-outer-container:after {
        content: '\e879';
        right: 20px;
      }
    
      .av-tab-section-outer-container:before {
        content: '\e878';
        left: 20px;
      }
    
      .av-tab-section-outer-container.av-start:before,
      .av-tab-section-outer-container.av-end:after {
        opacity: 0;
        visibility: hidden;
      }
    }

    Best regards,
    Nikko

    #1229891

    Thanks a lot Nikko! Works great!

    I just tweak a little the design of the arrows, in case it helps anyone else:

    
    .av-tab-section-outer-container:after, .av-tab-section-outer-container:before {
        font-family: 'entypo-fontello';
        font-size: 50px;
        position: absolute;
        top: 30px;
        z-index: 1000;
        padding: 30px 15px 30px 15px;
        background: #96ccbe;
        -webkit-transition: all 0.4s ease-out;
        -moz-transition: all 0.4s ease-out;
        transition: all 0.4s ease-out;
        color: white!important;
        pointer-events:none;
    }
    .av-tab-section-outer-container:after {
        content: '\e879';
        right: 0px;
      }
    .av-tab-section-outer-container:before {
        content: '\e878';
        left: 0px;
    }
    .av-tab-section-outer-container.av-start:before, .av-tab-section-outer-container.av-end:after {
        opacity: 0;
        visibility: hidden;
    }
    

    Have a nice day!

    #1229895

    Hi,

    Glad Nikko could help and thanks for sharing your version :)

    Let us know if you have any other questions or issues.

    Enjoy the rest of your day!

    Best regards,
    Yigit

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Arrows on tab section’ is closed to new replies.