ReloadItems of fb_portfolio and image carrusel

Hi, I would like to toggle the image carrusel and show the fb_portfolio when click on “see all projects” button of my website ( http://www.cgpills.eu/cgPillsNew/ ).

The problem is that when click the button the layout crashes until you click on a filter in case of the fb_portfolio or until you wait some time to refresh the slider in case of the image carrusel.

On a previous messages, there was a suggestion to re-initiate the masonry grid with reloadItems() method. But I’m not sure if I’m coding it good, as it isn’t working for me.
Does anyone have a solution for it?
Here is my code:

> jQuery(function($) {
> 	$('#ourWorkAll').hide();
> 	 $( '#showAllProjects' ).on( 'click', function( event ){
> 		event.preventDefault();
>       	$('#ourWorkCarrusel').toggle("slow");
>             $('#ourWorkCarrusel').masonry('reloadItems');
> 		$('#ourWorkAll').toggle("slow");
>             $('#ourWorkAll').masonry('reloadItems');
>   	});
> });

Thanks!

Hello,

It looks like this issue requires some coding and testing, this goes beyond our support policy. It’s considered advanced customization. As an option, you can contact Codeable for this kind of service, or find a reputable freelancer on Upwork.

Kind Regards, Roman.