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

    Hi, I have inserted shortcodes for a portfolio grid into tabs, with each tab holding a different category.
    When you click on a different tab, the spacing between the portfolio items is off – clipping off the items in the right hand column, and creating an unusually large gap between items.
    If you resize the window with this tab open, or refresh the page on this tab ID, then the portfolio grid displays correctly – but doesn’t seem to refresh the other tabs. It is happening in all browsers that I tested, PC and MAC.

    It seems like the calculation for the left margin of the grid items is out, but I can’t see how to rectify it.

    (I have also included a masonry grid shortcode, to see if this made a difference but it does not.)

    Appreciate any help I can get!

    #574362

    Hi ellamac!

    Thank you for using Enfold.

    Please add this in the functions.php file:

    add_action('wp_footer', 'ava_auto_resize');
    function ava_auto_resize(){
    ?>
    <script>
    (function($){
    	var int = '';
    	$( "#top .tabcontainer" ).bind({
    	mouseenter: function() {
    		int = window.setInterval(function(event){
    			$(window).trigger('resize');
    			console.log('resize');
    		}, 1000);
    	},
    	mouseleave: function() {
    		setTimeout(function() {
    			clearInterval(int);
    		}, 1000);
    	}
    });
    })(jQuery);
    </script>
    <?php
    }

    Best regards,
    Ismael

    #575457

    Thank you so much – that’s the one! Great quick support.

    #575526

    Hi!

    Great! Glad it worked. :)

    Regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Portfolio Grid within Tabs – cropped’ is closed to new replies.