Tagged: tab height, tab section
-
AuthorPosts
-
November 14, 2018 at 4:02 pm #1033535
Hi,
There is a known issue with the Tab Section layout module, where all your tabs adopt the height of the tallest/longest tab. If you have loads of content in one tab, you get a mile of whitespace in the other tabs. This looks dopey and I can’t see when this would be benefitial.There is a fix for this that works flawlessly, originally posted by moderator Ismael. You put the following code at the end of functions.php and all tabs have their own individual responsive height:
function ava_custom_script_fix(){ ?> <script> (function($){ function a() { $('.av-tab-section-container').bind('click', '.av-section-tab-title', function() { var active = $(this).find('.av-active-tab-title'), number = active.data('av-tab-section-title'), content = $(this).find('.av-layout-tab[data-av-tab-section-content='+ number +']').children('.av-layout-tab-inner'), oheight = content.outerHeight(true) + active.outerHeight(true) + 100; $(this).find('.av-tab-section-outer-container').css('max-height', oheight); }); $('.av-section-tab-title:eq(0)').trigger('click'); } a(); })(jQuery); </script> <?php } add_action('wp_footer', 'ava_custom_script_fix');
Can you please add this is the next patch of Enfold? It’s so frustrating to have this reset when updating the theme and having to go look for the code here.
Thanks to Ismael for the code. Thanks for a great theme, and support on the forums by all the talented users and mods!
Kind regards,
DavidNovember 15, 2018 at 8:27 am #1033821Hi David,
Thanks for sharing, but there is an option for that already in the element. Please look for the Content height option. You can select for the sections to have the same or individual height there.
Best regards,
RikardNovember 15, 2018 at 9:18 am #1033849Yes, that’s awesome!! Thanks a lot, Rikard!
Regards,
DavidNovember 16, 2018 at 4:27 am #1034251Hi David,
Thanks for the feedback :-)
Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardNovember 21, 2018 at 4:14 pm #1036138Hi,
Close it, please! Silly thread over feature that has already been implemented in the theme… Sorry for not being more thorough.Regards,
DavidNovember 22, 2018 at 6:32 pm #1036686Hi David,
We’ll be closing this then :)
Feel free to create a new thread if you need further assistance.
Thanks for using Enfold and have a great day!Best regards,
Nikko -
AuthorPosts
- The topic ‘Tab Section individual tab height issue. Fix ready to be implemented!’ is closed to new replies.