jQuery代码飞到购物车$('.add-to-cart').click(function() { var cart = $('.shopping_bg'); var imgtofly = $(this).parents('li.cart_items').find('a.product-image img').eq(0); if (imgtofly) { var imgclone = imgtofly.clone() .offset({ top:imgtofly.offset().top, left:imgtofly.offset().left }) .css({'opacity':'0.7', 'position':'absolute', 'height':'150px', 'width':'150px', 'z-index':'1000'}) .appendTo($('body')) .animate({ 'top':cart.offset().top + 10, 'left':cart.offset().left + 30, 'width':55, 'height':55 }, 1000, 'easeInElastic'); imgclone.animate({'width':0, 'height':0}, function(){ $(this).detach() }); } return false;});使用easeInElastic移动动画效果。您可以修改这个动画基于您的需要。
文件目录······
暂无数据
猜你喜欢
更多»
项目推荐
更多»
PDF电子书
更多»
Java多线程编程核心技术
(2)
Linux命令详解词典.pdf
(5)
深入Python3中文版
(0)
百度SEO一本通.pdf
(0)
mysql必知必会.pdf
(2)
疯狂JAVA讲义 pdf电子书
(3)
C# 图解教程pdf电子书
(3)
研磨设计模式 pdf电子书
(0)