function bounceAnimation(direction) {
        slider.className = 'bounce-from-' + direction;
        setTimeout(function() {
            slider.className = '';
        }, 400);
    }
Triggers the bounce animation
@param {('left'|'right')} direction - Direction of the movement