I want to a div to slide in from the right when clicking a button, and when clicking a close button, it should slide back and be hidden. I want to use the animation()-method but it doesn't seem to work.
here is what I got so far:
$('.cart-panel').css({
   'display': 'none',
   'transform' : 'translate(100%, 0%) matrix(1, 0, 0, 1, 0, 0)'            
});
$('.cart-btn').on('click', function(){
    $('.cart-panel').stop().animate({
        "display": 'block',
        "transform" : 'matrix(1, 0, 0, 1, 0, 0);'
     }, 300);            
 });
is there anything I missed? when I click the cart-btn absolutely nothing happens.
 
    