Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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,
    David

    #1033821

    Hi 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,
    Rikard

    #1033849

    Yes, that’s awesome!! Thanks a lot, Rikard!

    Regards,
    David

    #1034251

    Hi 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,
    Rikard

    #1036138

    Hi,
    Close it, please! Silly thread over feature that has already been implemented in the theme… Sorry for not being more thorough.

    Regards,
    David

    #1036686

    Hi 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

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Tab Section individual tab height issue. Fix ready to be implemented!’ is closed to new replies.