I have a script that creates a sliding effect with a list of items. When you click on a list item, a box slides to the right, and clicking again will slide it back to its original position in a toggle fashion.
Check out the demo here:
The issue I'm facing is regarding the width of the panel during the slide-out animation. I want the panel's width to be 700px as it slides out.
$(".panel").css("width","700px");
During the slide back in animation, I want the width to be 350px so that it hides behind the list again.
$(".panel").css("width","350px");
However, the problem I'm encountering is that when it slides back, the panel doesn't fully hide behind the list and still shows on the right side. Any help would be greatly appreciated. Thank you!