I am using CSS transitions to make a slide out panel. I am using Javascript to fire to animation like so;
function slidein()
{
document.getElementById('container').className = 'slidein';
}
function slideout()
{
document.getElementById('container').className = 'slideout';
}
<div onclick="slideout()">Click</div>
What I need to know is once I have fired the first function how can I swap the function so the user can then close the panel.
Try something like this: