Tagged: chrome, portfolio grid
Hello,
I am using the portfolio grid element on my website and I just noticed that when the page first loads on Chrome, it is condensing all of the images. If I reload or resize the window, it displays correctly, but not when I first visit the page. I’m not when it started, but I know it wasn’t always behaving this way. I checked it on Safari and Firefox and it works just fine, so it’s just a problem with Chrome. Is there any way to fix this? Thank you!
Hey Kirstie,
Thank you for using Enfold.
The items are not re-positioning correctly. Please add this script in the functions.php file.
add_action('wp_footer', 'ava_auto_resize');
function ava_auto_resize(){
?>
<script>
(function($){
var int = window.setInterval(function(){
$(window).trigger('resize');
}, 2000);
$(window).load(function () {
setTimeout(function() {
clearInterval(int);
}, 2000);
});
})(jQuery);
</script>
<?php
}
You may need to purge the cache or temporarily disable the css/js compression in the Enfold > Performance panel.
Best regards,
Ismael
That worked! Thanks!
Hi,
Great, glad you got it working. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
Rikard
It can be closed, thanks!