在复杂的jquery问题中,如果可能的话,我想要一个图像飞入另一个div
并将当前值加1,就像在购物车中一样
The scenario is a user can like another user, by clicking thumbs up next to his image now I want the image of user keeps getting smaller in size as it fly's to the counter, once reached to the div the image clicked should be removed.
即使在阅读教程并认为它是我需要帮助的东西之后,我也无法执行飞行和收缩部分
。我认为这是一件耗时的事情,因此任何指导将不胜感激。谢谢你,先生
杰斯 fiddle
http://jsfiddle.net/rigids/TYMfB/
下图解释了更多内容
最佳答案
如果我理解了这个问题,这应该会给你一个开始:
$(".row").click(function(){
var $this = $(this);
var pos = $this.position();
$this.css({position : "absolute", top: pos.top, left: pos.left})
.add($this.find("img"))
.animate({top: 0, left: 0, width: 0, height: 0},1000,function(){
$this.hide();
});
});
关于jquery - 使用飞行效果将一个 Div 飞到另一个 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9340641/