I am looking to achieve a smooth sliding out effect for my sidebars while expanding the width of the middle content div. I want this action to be toggled back to its original state with another click.
Here's what I've attempted so far:
$('.headbar').click(function () {
$(".leftside").animate({width: 'toggle'});
$( ".rightside" ).animate({
width: "toggle"
}, 300, function() {
$(".content").animate({width: '1200px'});
});
});
The Issues I'm Facing
The headbar is flashing when the animation starts (probably a CSS bug)
The content does not toggle back to its original state
My Understanding Concept