-
AuthorPosts
-
July 6, 2020 at 10:40 am #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!
July 7, 2020 at 12:57 am #1228435Hey Oscar,
Please provide a link to your site/page in question so we can look into this issue further.
Best regards,
Jordan ShannonJuly 7, 2020 at 1:23 am #1228451Hi Jordan,
Thank you for your response. The arrow is only visible under a 767 width.
Regards.
July 7, 2020 at 1:26 am #1228455Hi,
I’m currently only seeing a right arrow on your page. Did you already add any custom css for this?
Best regards,
Jordan ShannonJuly 7, 2020 at 2:09 am #1228458Hi 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
July 13, 2020 at 10:48 am #1229888Hi 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,
NikkoJuly 13, 2020 at 11:02 am #1229891Thanks 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!
July 13, 2020 at 11:10 am #1229895 -
AuthorPosts
- The topic ‘Arrows on tab section’ is closed to new replies.