Skip to content

Instantly share code, notes, and snippets.

@oblik
Created October 23, 2013 13:47
Show Gist options
  • Save oblik/7119079 to your computer and use it in GitHub Desktop.
Save oblik/7119079 to your computer and use it in GitHub Desktop.
Animation panier
// Check if the block cart is activated for the animation
if (cartBlockOffset != undefined && $picture.size())
{
$picture.appendTo('body');
$picture.css({ 'position': 'absolute', 'top': $picture.css('top'), 'left': $picture.css('left'), 'z-index': 4242 })
.animate({ 'width': '20px', 'height': '20px', 'opacity': 0.8, 'top': cartBlockOffset.top + 20, 'left': cartBlockOffset.left + 20 }, 2000,'easeInOutQuart',function(){
$('.ajax_cart_quantity').animate({opacity:0},200,"linear",function(){ $(this).animate({opacity:1},2000);});
$('#popup').bPopup({
easing: 'easeOutBack', //uses jQuery easing plugin
speed: 450,
transition: 'slideDown'
}
);
})
.fadeOut(100, function() {
ajaxCart.updateCartInformation(jsonData, addedFromProductPage);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment