Facing a problem with my jQuery animations. Successfully implemented the slide in effect for my flex sidebars, but struggling with the slide out effects. The slide out function is causing the sidebars to vanish instantly.
I think I need to incorporate the hide() and show() functions because using just min/max-width results in the sidebars making the flex canvas too tall.
Here are my slide out functions:
$('#close-left').click(function(event){
$('#left').animate({
'min-width': '0px',
'max-width': '0px',
}, 1250).hide();
});
$('#close-right').click(function(event){
$('#right').animate({
'min-width': '0px',
'max-width': '0px',
}, 1250).hide();
});
Created a demo on Fiddle demonstrating the same issues: https://jsfiddle.net/89s5tsLr/
Update: Also included another Fiddle showcasing how the right sidebar causes the flex canvas to become excessively tall without implementing the hide() function. https://jsfiddle.net/soq6webp/1/
Appreciate any assistance provided =)