如何使用jQuery缓慢删除元素? [英] How to remove an element slowly with jQuery?

查看:141
本文介绍了如何使用jQuery缓慢删除元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ target.remove()可以删除该元素,但是现在我希望这个过程有一些感觉动画,怎么做呢?

$target.remove() can remove the element,but now I want the process to be down with some feel animation,how to do it?

推荐答案

$target.hide('slow');

$target.hide('slow', function(){ $target.remove(); });

运行动画,然后从DOM中删除

to run the animation, then remove it from DOM

这篇关于如何使用jQuery缓慢删除元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆